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;
[b]sqpUnpack (IntPtr archiveName, IntPtr destFolder);[/b] archiveName – pointer to archive name destFolder – pointer to destination folder
I've declared it by
Declare Function unpack Lib "SQPE.dll" Alias "sqpUnpack" (ByRef archiveName As IntPtr, ByRef destFolder As IntPtr)
So in order to do this, I've used
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\" [b]So final = (selected - Filename+Format) + \_Unpack[/b]
These would be strings, for now.
And then, I'm trying to convert them into useable variables for the function inside the DLL file;
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
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?