Click here to Skip to main content
14,451,447 members

Managed C++/CLI

 
GeneralRe: Help needed: another strange calloc/malloc issue Pin
toxcct21-Jul-06 1:26
Membertoxcct21-Jul-06 1:26 
QuestionCasting problem (String* to LPCVOID) Pin
stancrm20-Jul-06 4:29
Memberstancrm20-Jul-06 4:29 
AnswerRe: Casting problem (String* to LPCVOID) Pin
toxcct20-Jul-06 4:32
Membertoxcct20-Jul-06 4:32 
AnswerRe: Casting problem (String* to LPCVOID) Pin
NrmMyth20-Jul-06 4:33
MemberNrmMyth20-Jul-06 4:33 
AnswerRe: Casting problem (String* to LPCVOID) Pin
Michael Dunn20-Jul-06 6:58
sitebuilderMichael Dunn20-Jul-06 6:58 
QuestionSearching through a file [modified] Pin
Mphot19-Jul-06 22:56
MemberMphot19-Jul-06 22:56 
AnswerRe: Searching through a file Pin
NrmMyth20-Jul-06 1:51
MemberNrmMyth20-Jul-06 1:51 
QuestionConvert COM component to C++ managed Assembly Pin
Paul Farry18-Jul-06 21:52
professionalPaul Farry18-Jul-06 21: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 14:49
Membervincent7_618-Jul-06 14:49 
AnswerRe: Problems adding textbox data into sql String Pin
led mike18-Jul-06 18:35
Memberled mike18-Jul-06 18:35 
AnswerRe: Problems adding textbox data into sql String Pin
Eric Dahlvang24-Jul-06 13:16
MemberEric Dahlvang24-Jul-06 13:16 
QuestionCommunicating with top level form Pin
mrhonus18-Jul-06 6:59
Membermrhonus18-Jul-06 6:59 
AnswerRe: Communicating with top level form Pin
led mike18-Jul-06 7:51
Memberled mike18-Jul-06 7:51 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 8:39
Membermrhonus18-Jul-06 8:39 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 9:38
Memberled mike18-Jul-06 9:38 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 10:17
Membermrhonus18-Jul-06 10:17 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 10:36
Memberled mike18-Jul-06 10:36 
GeneralRe: Communicating with top level form Pin
mrhonus18-Jul-06 11:32
Membermrhonus18-Jul-06 11:32 
GeneralRe: Communicating with top level form Pin
led mike18-Jul-06 12:01
Memberled mike18-Jul-06 12:01 
QuestionCall java from C++ Pin
Vamp18-Jul-06 2:36
MemberVamp18-Jul-06 2:36 
AnswerRe: Call java from C++ Pin
MonjSam21-Jul-06 14:14
MemberMonjSam21-Jul-06 14:14 
Questionabout Event Handler Pin
mertadin17-Jul-06 0:34
Membermertadin17-Jul-06 0:34 
QuestionHow to embed a resource in the assembly? Pin
Super Lloyd13-Jul-06 20:57
MemberSuper Lloyd13-Jul-06 20:57 
AnswerRe: How to embed a resource in the assembly? Pin
Super Lloyd13-Jul-06 21:05
MemberSuper Lloyd13-Jul-06 21:05 
QuestionVC7 Preprocessor variables not working. Pin
Dave_Roach13-Jul-06 2:43
MemberDave_Roach13-Jul-06 2: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.