Hi,
I am currently trying to write a flash programmer uisng the SiUtil.dll file from Silicon Labs.
I am having problems when trying to read the scratchpad memory.
C++ Prototype: extern "C" __declspec(dllimport) int__stdcall GetScratchPadMemory(
BYTE * ptrMem, DWORD wStartAddress, unsigned int nLength);
C#
[DllImport(@"C:\temp\SiUtil.dll")]
public static extern int GetScratchPadMemory(ref byte Data, uint AddressToRead, uint Lenght);
I am sure there is some problems with how I declare this, but I do not know how to fix it.
I hope someone can guide me towards the correct way to do this.
Regards
John-Ove
Loading
John LarsenPosted Aug 29, 2011, 2:06 PM
John LarsenPosted Aug 29, 2011, 2:05 PM
Are you sure that there is a method GetScratchPadMemory with same signature what you have specified here?
Hi,
Well, I am not 100% sure because the datasheet does not talk about this function BUT in the source code they have supplied the function is there with the same signature. And I do not get an error when building the solution.
If the function had not been there I guess I would get an error message saying that this function has not been found in given DLL file?
Regards
John-Ove
VulpesPosted Aug 29, 2011, 9:52 AM
Jaganathan BantheswaranPosted Aug 29, 2011, 9:02 AM
Are you sure that there is a method GetScratchPadMemory with same signature what you have specified here?