QUOTE(fatimid08 @ Jul 10 2006, 07:02 PM)
Ok, so here is my problem, I'm trying to use this function from Starforge.dll in vb.net :
VB 6 version (straight from the Starforge.dll specs put online by Heimdal):
Public Declare Function StringGetString Lib "StarForge.dll" (ByVal MapHandle As Long, ByVal StringID As Long, ByVal Str As String) As Long
VB.Net version:
Public Declare Function StringGetString Lib "StarForge.dll" (ByVal MapHandle As IntPtr, ByVal StringID As Integer, ByVal Str As String) As Integer
This, understandably, does not work, since the Str parameter is ByVal and it should be ByRef so it can be modified by the dll. (It gives an access violation error)
But when I put it as ByRef, it causes a stack imbalance because the signature does not match.
Then, I tried some stuff, I put the StringID parameter as ByRef, and now, it doesn't give any error, it just gives me a Null string for any value I put in. I've tried it with different maps that at least have 200 strings in them.
[right][snapback]521345[/snapback][/right]
I think this is for the
Starforge Forum ... Or is it ?