Passing Pictures by using DLL
I want to read a picture resource file (*.res) which is included in an
ActiveX DLL. If I want to change a picture, I only have to update the DLL,
without recompiling my source. It's handy in a multi-language environment.
Composing the resource-file is no problem, creating the DLL succeeds as wel,
but calling my DLL-function always fails. Doing this in C++ was a piece of
cake with pointers but in VB, it's a hell !!!
The object is created, when I debug my DLL-function "GetIcon" the line
succeeds, but when i returns the calling function (form_load) fails,
without an error-message !
Anybody has an idea to solve this ? Anybody does know how to pass pictures
between a DLL and an EXE ?
Thanks in advance !
Jean-Marie De Smet
Private objPic As Pic.GetPictures
Set objPic = CreateObject("Pic.GetPictures")
call imgToolbar.ListImages.Add(1, , GetIcon(1))
objPic = nothing
Public function GetIcon(ByVal lIDIcon As Long) as StdPicture
Set GetIcon = LoadResPicture(lIDIcon, vbResIcon)