高手请进,帮忙分析代码,高分求救!!!
以下代码中,能找到资源的句柄,就是不能播放它。头痛!
Dim hRsrc As Long
Dim hGlobal As Long
Dim lpString As String
Dim strCmd As String, strReturnVal As String
Dim nbuf As Long
Dim temp As Long
lpString = "about"
hInst = LoadLibrary(App.Path & "\lang936.dll")
hRsrc = FindResource(hInst, lpString, "wave")
hGlobal = LoadResource(hInst, hRsrc)
lpData = LockResource(hGlobal)
Debug.Print lpData
sndPlaySound lpData, SND_NODEFAULT + SND_SYNC + SND_MEMORY
FreeLibrary hInst