Click here to Skip to main content
15,895,538 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Help needed: another strange calloc/malloc issue Pin
toxcct21-Jul-06 0:26
toxcct21-Jul-06 0:26 
QuestionCasting problem (String* to LPCVOID) Pin
stancrm20-Jul-06 3:29
stancrm20-Jul-06 3:29 
AnswerRe: Casting problem (String* to LPCVOID) Pin
toxcct20-Jul-06 3:32
toxcct20-Jul-06 3:32 
AnswerRe: Casting problem (String* to LPCVOID) Pin
NrmMyth20-Jul-06 3:33
NrmMyth20-Jul-06 3:33 
AnswerRe: Casting problem (String* to LPCVOID) Pin
Michael Dunn20-Jul-06 5:58
sitebuilderMichael Dunn20-Jul-06 5:58 
QuestionSearching through a file [modified] Pin
Mphot19-Jul-06 21:56
Mphot19-Jul-06 21:56 
AnswerRe: Searching through a file Pin
NrmMyth20-Jul-06 0:51
NrmMyth20-Jul-06 0:51 
QuestionConvert COM component to C++ managed Assembly Pin
Paul Farry18-Jul-06 20:52
professionalPaul Farry18-Jul-06 20:52 
I currently have a COM component (and source) that talks to a printer and also a hardware port through a Vendor supplied DLL that makes fairly low level calls, and was wondering if there is a reference for displaying how to create a Managed Assembly in C++ that can performed the unmanaged calls, but present a nice .Net interface for the other developers. It does lots of GetProcAddress and

I would prefer not to interop to my existing COM Component, because I am trying to get a clean project.

I could possibly do it in C#, but wondering if it would be better in managed C++?

		<br />
	PORTOUT PortOut;<br />
	PORTWORDOUT PortWordOut;<br />
	PORTDWORDOUT PortDWordOut;<br />
	PORTIN PortIn;<br />
	PORTWORDIN PortWordIn;<br />
	PORTDWORDIN PortDWordIn;<br />
	SETPORTBIT SetPortBit;<br />
	CLRPORTBIT ClrPortBit;<br />
	NOTPORTBIT NotPortBit;<br />
	GETPORTBIT GetPortBit;<br />
	RIGHTPORTSHIFT RightPortShift;<br />
	LEFTPORTSHIFT LeftPortShift;<br />
	ISDRIVERINSTALLED IsDriverInstalled;<br />
...<br />
and then makes calls like this<br />
...<br />
<br />
	LoadIODLL();<br />
	PortOut(0x2E,(unsigned char) 0x87);<br />
	PortOut(0x2E,(unsigned char) 0x87);<br />
	PortOut(0x2E,(unsigned char) 0x07);<br />
	PortOut(0x2F,(unsigned char) 0x07);<br />
	PortOut(0x2E,(unsigned char) 0xf1);<br />
<br />
...<br />
<br />
hio = LoadLibrary("cashdrawerio.dll");<br />
		if (hio == NULL)<br />
		{<br />
			return;<br />
		}<br />
		else<br />
		{<br />
<br />
			PortOut = (PORTOUT)GetProcAddress(hio, "PortOut");<br />
			PortWordOut = (PORTWORDOUT)GetProcAddress(hio, "PortWordOut");<br />
			PortDWordOut = (PORTDWORDOUT)GetProcAddress(hio, "PortDWordOut");<br />
			PortIn = (PORTIN)GetProcAddress(hio, "PortIn");<br />
			PortWordIn = (PORTWORDIN)GetProcAddress(hio, "PortWordIn");<br />
			PortDWordIn = (PORTDWORDIN)GetProcAddress(hio, "PortDWordIn");<br />
			SetPortBit = (SETPORTBIT)GetProcAddress(hio, "SetPortBit");<br />
			ClrPortBit = (CLRPORTBIT)GetProcAddress(hio, "ClrPortBit");<br />
			NotPortBit = (NOTPORTBIT)GetProcAddress(hio, "NotPortBit");<br />
			GetPortBit = (GETPORTBIT)GetProcAddress(hio, "GetPortBit");<br />
			RightPortShift = (RIGHTPORTSHIFT)GetProcAddress(hio, "RightPortShift");<br />
			LeftPortShift = (LEFTPORTSHIFT)GetProcAddress(hio, "LeftPortShift");<br />
			IsDriverInstalled = (ISDRIVERINSTALLED)GetProcAddress(hio, "IsDriverInstalled");<br />
<br />
		}<br />

QuestionProblems adding textbox data into sql String Pin
vincent7_618-Jul-06 13:49
vincent7_618-Jul-06 13:49 
AnswerRe: Problems adding textbox data into sql String Pin
led mike18-Jul-06 17:35
led mike18-Jul-06 17:35 
AnswerRe: Problems adding textbox data into sql String Pin
Eric Dahlvang24-Jul-06 12:16
Eric Dahlvang24-Jul-06 12:16 
QuestionCommunicating with top level form Pin
mrhonus18-Jul-06 5:59
mrhonus18-Jul-06 5:59 
AnswerRe: Communicating with top level form Pin
led mike18-Jul-06 6:51
led mike18-Jul-06 6:51 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 7:39
mrhonus18-Jul-06 7:39 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 8:38
led mike18-Jul-06 8:38 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 9:17
mrhonus18-Jul-06 9:17 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 9:36
led mike18-Jul-06 9:36 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 10:32
mrhonus18-Jul-06 10:32 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 11:01
led mike18-Jul-06 11:01 
QuestionCall java from C++ Pin
Vamp18-Jul-06 1:36
Vamp18-Jul-06 1:36 
AnswerRe: Call java from C++ Pin
MonjSam21-Jul-06 13:14
MonjSam21-Jul-06 13:14 
Questionabout Event Handler Pin
mertadin16-Jul-06 23:34
mertadin16-Jul-06 23:34 
QuestionHow to embed a resource in the assembly? Pin
Super Lloyd13-Jul-06 19:57
Super Lloyd13-Jul-06 19:57 
AnswerRe: How to embed a resource in the assembly? Pin
Super Lloyd13-Jul-06 20:05
Super Lloyd13-Jul-06 20:05 
QuestionVC7 Preprocessor variables not working. Pin
Dave_Roach13-Jul-06 1:43
Dave_Roach13-Jul-06 1:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.