Hi.
I've got this DLL File I'm working with, trying to combine it with a simple VS 2012 GUI, minor good stuff. But I'm sort of at a 'dead end'.
I know the functions inside the DLL file, and the one I'm working on now is;
I've declared it by
So in order to do this, I've used
These would be strings, for now.
And then, I'm trying to convert them into useable variables for the function inside the DLL file;
And this results with this;
![]()
First time working with VS 2012 & DLL Files, so trying to learn. Anyone got a clue why it's doing this?
I've got this DLL File I'm working with, trying to combine it with a simple VS 2012 GUI, minor good stuff. But I'm sort of at a 'dead end'.
I know the functions inside the DLL file, and the one I'm working on now is;
Code:
sqpUnpack (IntPtr archiveName, IntPtr destFolder);
archiveName pointer to archive name
destFolder pointer to destination folderCode:
Declare Function unpack Lib "SQPE.dll" Alias "sqpUnpack" (ByRef archiveName As IntPtr, ByRef destFolder As IntPtr)Code:
selected = SelectFileDialog.FileName
path = selected.ToString().Split("\")
Dim count As Integer = path.Length
Dim x As Integer = 0
ReDim Preserve path(UBound(path) - 1)
While (x < (count - 1))
final = final & path(x) & "\"
x += 1
End While
final = final & "_Unpack\"
So final = (selected - Filename+Format) + \_UnpackAnd then, I'm trying to convert them into useable variables for the function inside the DLL file;
Code:
Try
Dim test As IntPtr = New IntPtr(Convert.ToInt32(Marshal.StringToHGlobalAuto(selected), 32))
Dim test2 As IntPtr = New IntPtr(Convert.ToInt32(Marshal.StringToHGlobalAuto(final), 32))
unpack(test, test2)
Catch ex As Exception
MsgBox(ex.Message())
End Try
First time working with VS 2012 & DLL Files, so trying to learn. Anyone got a clue why it's doing this?