Need help learning to wrap functions in Dlls in Win32
I'm trying to learn how to wrap functions in Dlls, and thought I would
start by wrapping the Shell_NotifyIcon function in shell32.dll. I want to
use Win32lib for other things, so I didn't use Bernie Ryan's win32api.ew,
but I did look at it and try to understand it.
I THINK I've got the gist, but I'm still having some trouble. Here's the
code:
code begin/
constant
Win = create( Window, "Taskbar Window Hide", 0, 0, 0, 640, 480, 0)
global constant
xShellNotify = linkFunc(shell32, "Shell_NotifyIconA", {C_LONG, C_LONG},
C_INT)
global constant
niccbSize = allot(Long),
nichIconData = allot(Long),
nicUID = allot(UInt),
nicUFlags = allot(UInt),
nicCallBack = allot(UInt),
nichIcon = allot(Long),
SIZEOF_ICONDATA = allotted_size()
atom NOTIFYICONDATA
NOTIFYICONDATA = allocate_struct(SIZEOF_ICONDATA)
atom pIconData
atom ok
pIconData = allocate_struct(SIZEOF_ICONDATA)
procedure hide_taskbar(object style, object x, object y)
ok = c_func( xShellNotify, {#10005, pIconData} )
end procedure
onResize[Win] = routine_id("hide_taskbar")
WinMain( Win, Normal)
/end code
This does nothing but put the window on the screen. Did I wrap the function
right? What am I doing wrong?
Thanks,
Sherm
|
Not Categorized, Please Help
|
|