Click here to Skip to main content
15,888,158 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi
I need to get informations from my photo printer ( printer serial, firmware version and ribbon count)
when I email printer's company they provide me basic VC6 project to show how to use DevInfo.dll.

I need just one exported function "HITI_GetDeviceInfoW" to use in my VB.NET project

I attach the VC6 project ...can anyone help to convert this simple project to VB.NET


how can I convert this
convert from VC6:

C++
unsigned long __stdcall HITI_GetDeviceInfoW(WCHAR* szPrinterW, unsigned long dwInfoType, unsigned char *lpInfoData, unsigned long *lpdwDataLen);




and this for function call VC6:

C++
DWORD				dwRet = 0;
	WCHAR				wszData[32] = {0};
	DWORD				dwLen = 0;

	dwRet = HITI_GetDeviceInfoW(0, 1, (unsigned char *)wszData, &dwLen);




Thanks
Posted
Comments
Richard Deeming 19-Oct-15 11:48am    
REPOST
You have already posted this question, and accepted a solution:
http://www.codeproject.com/Questions/1041335/Use-function-from-Cplusplus-exported-dll-in-VB-NET[^]
micmdk 19-Oct-15 12:04pm    
Sorry Not full solution
Richard Deeming 19-Oct-15 12:18pm    
So engage with the people who tried to help you on your previous copy of this question.

Reposting the same question over and over again will only serve to annoy the people who are trying to help you.
ZurdoDev 19-Oct-15 12:56pm    
Have you tried just adding a reference to the dll?
micmdk 20-Oct-15 6:17am    
the dll is not .NET dll and also not com component
so I can not adding a reference to the dll

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900