Importing windows libs
Posted: Tue Nov 20, 2018 7:15 pm
I'm trying to import some functions in comctl32.dll like SetWindowSubclass() to avoid using Openlibary() etc.
I used polib.exe:
polib /out:c:\comctl32.lib /machine:X86 C:\Windows\System32\comctl32.dll
and then import
the function works until you uncomment the Openwindow() code, then crashes at the first line.
This is on W732 on W764 works perfect and the function does its job(undecorating and using machine:X64)
PB5.62 - 5.70
Any hints? is this the correct way to do this?
I used polib.exe:
polib /out:c:\comctl32.lib /machine:X86 C:\Windows\System32\comctl32.dll
and then import
Code: Select all
Import "comctl32.lib"
SetWindowSubclass_(hwnd.i, pfnSubclass.i, uIdSubclass.i, dwRefData.i) As "_SetWindowSubclass"
EndImport
Debug SetWindowSubclass_(0, 0, 0, 0)
; OpenWindow(0, 0, 0, 300, 30, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;
; Repeat
; Event = WaitWindowEvent()
;
; Until Event = #PB_Event_CloseWindow
This is on W732 on W764 works perfect and the function does its job(undecorating and using machine:X64)
PB5.62 - 5.70
Any hints? is this the correct way to do this?