Ipicture msdn7/1/2023 The arguments wMsg and wParam are used to pass data, so they can be Long in both 32-bit and 64-bit. Both of these must be declared LongPtr in 64-bit VBA. The return value is a pointer to a function, which is also an address in memory. The first argument -hWnd- is a window handle, which is an address in memory. Public Declare PtrSafe Function SendMessageA Lib “user32″ ( ByVal hWnd As LongPtr, ByVal wMsg As Long, _īyVal wParam As Long, lParam As Any) As LongPtr GetMyFile = Trim(Left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) – 1)) OpenFile.nMaxFileTitle = OpenFile.nMaxFile OpenFile.lpstrFileTitle = OpenFile.lpstrFile OpenFile.nMaxFile = Len(OpenFile.lpstrFile) – 1 OpenFile.nMaxFile = LenB(OpenFile.lpstrFile) – 1 Public Function GetMyFile(strTitle As String) As String “GetOpenFileNameA” (pOpenfilename As OPENFILENAME) As Long Public Declare Function GetOpenFileName Lib “comdlg32.dll” Alias _ “GetOpenFileNameA” (pOpenfilename As OPENFILENAME) As Long Public Type OPENFILENAME Public Declare PtrSafe Function GetOpenFileName Lib “comdlg32.dll” Alias _ SuperShell sFile, Left(sFile, InStrRev(sFile, “\”)), 0, SW_NORMAL, HIGH_PRIORITY_CLASS SFile = Application.GetOpenFilename(“Executables (*.exe), *.exe”,, “”) ‘ WaitForSingleObject pinfo.hProcess, dwMilliseconds If CreateProcess(vbNullString, App, sec1, sec2, False, pclass, _ Private Function SuperShell( ByVal App As String, ByVal WorkDir As String, dwMilliseconds As Long, _īyVal start_size As enSW, ByVal Priority_Class As enPriority_Class) As Boolean LpProcessInformation As PROCESS_INFORMATION) As Long LpProcessInformation As PROCESS_INFORMATION) As LongPtr Const INFINITE =
0 Comments
Leave a Reply. |