Passing Pictures by using DLL 
Author Message
 Passing Pictures by using DLL

Hi all,

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


My code:

EXE-module
---------------

...

Private objPic As Pic.GetPictures
...
private Form_load()

    Set objPic = CreateObject("Pic.GetPictures")

    call imgToolbar.ListImages.Add(1, , GetIcon(1))

end sub

Form_unload()
    objPic = nothing
end sub

....

DLL-function
-----------------

Public function GetIcon(ByVal lIDIcon As Long) as StdPicture

    Set GetIcon = LoadResPicture(lIDIcon, vbResIcon)

End function



Sun, 13 Jan 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Passing a Picture object across Dll boundaries

2. Passing a Picture object across Dll boundaries

3. Retrieve picture by using DLL-method

4. Using Pictures stored in DLL's

5. Retrieve pictures by using DLL-method

6. Saving picture from a picture box using screen capturing

7. Using a picture box picture as the mouse icon

8. Using Data instead of Picture files to populate a picture of a control

9. Passing parameters to SQLServer using a Pass-Through query

10. passing 2Dim array to DLL swaps rows/cols (continued DLL thing)

11. DLL: Passing an array as a parameter to a DLL

12. Passing a 2-D array from one dll to another dll

 

 
Powered by phpBB® Forum Software