Using a DLL in VS with VB - Help ! [modified]
-
I have a canon sdk – my VB program has the following code (which I extracted from a Canon sample program and which works in their really complex example) . . . I refuse to tell you how long it took me to get here :) Public Declare Function EdsGetPropertySize Lib "EDSDK" ( _ ByVal inRef As IntPtr, _ ByVal inPropertyID As Integer, _ ByVal inParam As Integer, _ ByRef outDataType As EdsDataType, _ ByRef outSize As Integer) As Integer This does not generate an error in Visual Studio = However the following set of statements (on the next line) Public Declare Function EdsGetPropertyDesc Lib "EDSDK" ( _ ByVal inRef As IntPtr, _ ByVal inPropertyID As Integer, _ ByRef outPropertyDesc As EdsPropertyDesc) As Integer Generates an error EdsPropertyDesc is not defined I suspect this is VS operator error (ME) – I must not understand how to import all of the methods from a DLL – and the msdn library is not helpful When I try to put in a new Declare function - the autocomplete has a few of the methods from within "EDSDK" but not all . . .I have tried to open the edsdk.dll from the object browser - I can see the file, but when I select add the file appears i the lower select list but when I hit the OK button I get an error "The following Components could not be browsed" -- modified at 14:00 Tuesday 30th January, 2007