Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dev-c++ to "call" another program PinPopular
Chuck O'Toole5-Nov-11 3:05
Chuck O'Toole5-Nov-11 3:05 
GeneralRe: dev-c++ to "call" another program Pin
RealHigh5-Nov-11 10:35
RealHigh5-Nov-11 10:35 
QuestionHow do you model your documents? Pin
Fernando A. Gomez F.4-Nov-11 9:43
Fernando A. Gomez F.4-Nov-11 9:43 
QuestionHow to remove 'The publisher could not be verified. Are you sure you want to run this software?' Pin
DanYELL4-Nov-11 6:48
DanYELL4-Nov-11 6:48 
AnswerRe: How to remove 'The publisher could not be verified. Are you sure you want to run this software?' Pin
Software_Developer4-Nov-11 8:20
Software_Developer4-Nov-11 8:20 
QuestionIShellFolder2::GetDetailsOf method not find details of 2007 and upper MS office files. Pin
Le@rner4-Nov-11 0:28
Le@rner4-Nov-11 0:28 
Question"using system" generates "undeclared" error. _outp also. Pin
RealHigh3-Nov-11 7:38
RealHigh3-Nov-11 7:38 
AnswerRe: "using system" generates "undeclared" error. _outp also. Pin
Goto_Label_3-Nov-11 8:22
Goto_Label_3-Nov-11 8:22 
After the #include <...> lines, insert the following:

C#
short _stdcall Inp32(short PortAddress); */
void _stdcall Out32(short PortAddress, short data);

and link with inpout32.dll


Sample code:
C#
#include <conio.h>
#include <windows.h>
#include<iostream>
short _stdcall Inp32(short PortAddress); */
void _stdcall Out32(short PortAddress, short data);

//link with inpout32.dll

using namespace std;

int main()
{
	cout<<"Parallel Port Interfacing"<<endl;
	cout<<"Press 8 to forw, 2 to reverse,4 to left,6 to right,1 to forw&left and 3 to forw&right:"<<endl;
	int inp;
	do
	{
		inp=getch();
		out32(0x378,0x00);
		if(inp=='8')//D0 forward
		{
			cout<<"forward";
			out32(0x378,0x01);
		}
		else if(inp=='2')//D1 reverse
		{
			cout<<"reverse";
			out32(0x378,0x02);
		}
		else if(inp=='4')//D2 left
		{
			cout<<"left";
			out32(0x378,0x04);
		}
		else if(inp=='6')//D3 right
		{
			cout<<"right";
			out32(0x378,0x08);
		}
		else if(inp=='1')//D0&D2 forward&left
		{
			cout<<"forward and left";
			out32(0x378,0x05);
		}
		else if(inp=='3')//D0&D3 forward&right
		{
			cout<<"forward and right";
			out32(0x378,0x09);
		}
	}
	while(inp=='1'||inp=='2'||inp=='3'||inp=='4'||inp= ='6'||inp=='8');
	system("pause");
return 0;
}

GeneralRe: "using system" generates "undeclared" error. _outp also. Pin
RealHigh4-Nov-11 8:39
RealHigh4-Nov-11 8:39 
QuestionRe: "using system" generates "undeclared" error. _outp also. Pin
David Crow3-Nov-11 9:49
David Crow3-Nov-11 9:49 
AnswerRe: "using system" generates "undeclared" error. _outp also. Pin
RealHigh4-Nov-11 8:45
RealHigh4-Nov-11 8:45 
QuestionWhy DrawText() fails? Pin
RS.Ratheesh3-Nov-11 4:03
RS.Ratheesh3-Nov-11 4:03 
QuestionRe: Why DrawText() fails? Pin
David Crow3-Nov-11 4:22
David Crow3-Nov-11 4:22 
AnswerRe: Why DrawText() fails? Pin
Albert Holguin3-Nov-11 4:55
professionalAlbert Holguin3-Nov-11 4:55 
AnswerRe: Access violation: Something is NULL Pin
Software_Developer3-Nov-11 6:46
Software_Developer3-Nov-11 6:46 
QuestionRe: Access violation: Something is NULL Pin
bob169724-Nov-11 3:44
bob169724-Nov-11 3:44 
AnswerRe: Why DrawText() fails? Pin
Richard MacCutchan3-Nov-11 7:14
mveRichard MacCutchan3-Nov-11 7:14 
QuestionRestore folder to previous version? Pin
bosfan3-Nov-11 3:23
bosfan3-Nov-11 3:23 
AnswerRe: Restore folder to previous version? Pin
David Crow3-Nov-11 4:28
David Crow3-Nov-11 4:28 
GeneralRe: Restore folder to previous version? Pin
bosfan3-Nov-11 4:34
bosfan3-Nov-11 4:34 
AnswerRe: No such function. Pin
App_3-Nov-11 7:31
App_3-Nov-11 7:31 
GeneralRe: No such function. Pin
Philippe Mori4-Nov-11 14:41
Philippe Mori4-Nov-11 14:41 
QuestionAfter video(MCIWndPlay) stops and window is moved control becomes empty??? Pin
VCProgrammer2-Nov-11 19:45
VCProgrammer2-Nov-11 19:45 
AnswerRe: After video(MCIWndPlay) stops and window is moved control becomes empty??? Pin
Software_Developer2-Nov-11 23:26
Software_Developer2-Nov-11 23:26 
QuestionSave as.. and open Pin
antonio3432-Nov-11 8:36
antonio3432-Nov-11 8:36 

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.