IDRISI API SERVER

I have tried your code, but that it is not the problem I am having- I supect it isn't working because the API I am accessing is an exe file not a dll and is designed for VBA not for the new VB.net framework. The structure and way of dealing with API is different, therefore it doesn't work.

Thanks anyway

Leo

[315 byte] By [Leo13] at [2007-12-16]
# 1
Are you forgetting add the imports <module reference name> at the top of your code?
Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Hi thanks for the reply
Even if I do that still the same problem
when I type Idrisi32. then I don't get the functions- I just get 3 options which are IdrisiAPI server
ClassApisever
IdrisiApiserver

Thanks
Leo

Leo13 at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
If your importing from a dll then use



<System.Security.SuppressUnmanagedCodeSecurity(), System.Runtime.InteropServices.DllImport("the_dll_name.dll")> _
Public Shared Function Function_Name(Function_Args_when_called) As
Return_Type
End Function

or for a sub...



<System.Security.SuppressUnmanagedCodeSecurity(), System.Runtime.InteropServices.DllImport("the_dll_name.dll")> _
Public Shared Sub theSub_Name(Args_when_called)
End Sub

leaving the functions empty.

Then from your project, simply use Call function_name()
the <System.Security.SuppressUnmanagedCodeSecurity(), ..... is to avoid warnings in the compiler.

Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
I have tried your code, but that it is not the problem I am having- I supect it isn't working because the API I am accessing is an exe file not a dll and is designed for VBA not for the new VB.net framework. The structure and way of dealing with API is different, therefore it doesn't work.

Thanks a lot anyway

Leo

Leo13 at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...