Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to communicate with Pmac Controller by using C# windows application
I am using VS2008 ,OS-WindowsXP

Communication Cable- ethernet

I have searched a lot regarding this but there is no deltatau documentation on It

I have VC++ code.. but I am not able to convert it
CODE

this code implements interface which have Interface COleDispatchDriver which is not availble in c#
there are many pointers also.
C++
void CIPmacDevice::Open(long dwDevice, BOOL* pbSuccess)
{
	static BYTE parms[] = 
		VTS_I4 VTS_PBOOL;
	
	InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 dwDevice, pbSuccess);
}


void CIPmacDevice::SelectDevice(long hWindow, long* pDeviceNumber, BOOL* pbSuccess)
{
	static BYTE parms[] =
		VTS_I4 VTS_PI4 VTS_PBOOL;
	InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 hWindow, pDeviceNumber, pbSuccess);
}


How to convert following code in C#
Posted
Updated 29-Mar-14 6:30am
v2

1 solution

Er... Delta Tau provide a Development Kit for .net programmers...details of DK here[^]

It's not free though

As for converting code from C++ to C# google for free online code converters. They are not the best, and if you can't convert the code yourself you may have to pay someone to do it for you.

Personally I think your best bet is Delta Tau's toolkit, and to contact their support if you have any problems
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Mar-14 21:39pm    
Exactly. The API is not very good (by far), but at least it makes the use of COM totally pointless. My 5.
—SA
krishpraj123 30-Mar-14 13:01pm    
I got the exe Pcommserver
I am using it and its working good.
Sergey Alexandrovich Kryukov 30-Mar-14 13:24pm    
So, why do you think .NET API won't work for you? If you are using C#, why messing with COM? If .NET API have some problems, then think of something else... :-)
—SA

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