|
What are you using to transmit the data?.. serial cable, modems? Have you confirmed that the hardware is configured correctly by opening a hyperterminal session on the transmitting PC and sending test data to the receiving PC using the same settings as you use in your program? You must make sure that the ports and hardware (serial cable or modems) are properly configured first. Then, if your program still does not work, start looking at the code for errors.
Roger
|
|
|
|
|
i am using null modem cable for the transmission of data.through hyper terminal the data is getting transferred and recieved.but not happening through my program any way i am writing my code down to this matter if possible plz help me to solve this problem
my program is as follows:#include<conio.h>
#include<bios.h>
#include<stdio.h>
#include<dos.h>
#define COM1 1
#define SETTINGS (0x80 | 0x02 | 0x00 | 0x00)
void transmit();
void display();
void main()
{
clrscr();
transmit();
}
void transmit()
{
char msg,msg_in;
int status,out,in,count=0,count_in=0,i,extra;
int x,y,n;
x=bioscom(0, SETTINGS, COM1);
bioscom(3,0,COM1);
n=x;
printf("\n the status in binary is:");
while(n!=0)
{
printf("%d",(n%2));
n=n/2;
}
msg=getche();
bioscom(1,msg,COM1);
printf("\n %d",x);
window(10,10,40,11);
/* while (1)
{
if (kbhit())
{
gotoxy(count+1,1);
if ((in = getche()) == 27)//if esc is pressed then exit
break;
if(in==0)
{
in= getch();
continue;
}
if(in==8 && count>0) { count-=2;cprintf(" \b");}
else msg[count]=in;
if(count==70) {in=13; msg[70]=13;}
count++;
if(in==13 )
{
i=0;
display(msg,14);
for(i=0;i
|
|
|
|
|
Hey, been awful busy this week and didn't notice that you replied.
Check your parameter to bioscom. I think COM1 should be defined as 0 and COM2 would be 1. Your library implementation may be different.
You should be passing 3 for the first argument to obtain the status, not 0.
Take a look at this page for a complete discussion on bisocom...
http://www.funducode.com/freec/Hardware/new_hi_c02/Article02.htm[^]
Roger
|
|
|
|
|
Hi all,
I am in embedded vc++. How to draw a line with line caps like Circle end, Arrow end, Diamond end and so on. I am trying to do in an GDI application.Can anyone help me to do.
Warmly
Darwin S.
DARWIN PAUL RAJ
|
|
|
|
|
Hi all,
Still I didn't get any solutions for the problem. can anyone help to find out the solution for this.
DARWIN PAUL RAJ
|
|
|
|
|
Would you please explain it briefly?
A Journey of thousand miles must begin with a single step.
|
|
|
|
|
FYI I've ONLY written 6 programs in my WHOLE life
So this is what is going on.
function is ln(x^2)=.07
Lower x is .5, Upper x is 1
Gotta find the root...here is the program
#include <iostream>
#include <iomanip>
#include <cmath>
void bisection (double, double, double);
double f(double);
int main()
{
double xl=0.;
double xu=0.;
double xr=0.;
cout<<"Enter a lower number and an upper number:"<<endl;
cin>>xl>>xu;
bisection (xl, xu, xr);
return 0;
}
void bisection (double xl, double xu, double xr)
{
int i=0;
double func1=0.;
double func2=0.;
double func3=0.;
func1= f(xl);
func2= f(xu);
xr=(xl+xu)/2.;
if (func1*func2>0.)
{
cout << "Warning: No root exist"<< endl;
}
else
{
for (i=1; i<7; i++)
{
func3= f(xu);
}
if (func1*func3<0.)
{
cout<<"root lies in lower subinterval"<
|
|
|
|
|
(Hi shorty02br, next time please check the "Do not treat <'s as HTML tags" checkbox before submitting your post so that angle brackets show properly.)
Starting from the '98 C++ standard, cout (and most other runtime library identifiers) are into namespace std . Write std::cout instead and things should be fine. If you don't know what namespaces are, I suggest you goggle for some tutorial, the concept is very simple anyway.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Thank You.
I'm so stupid. i KNOW what name space is. The whole using namespace std;....i don't know what i was thinking. Thank you so much.;)
|
|
|
|
|
Hi,
We are using pervsive database.To run our application we have have to map that server and from that location only we can able to run our application.Initially to run our application we have to register all necessary ocx controls.
But the problem is to archive or some other reason they are changing the servers.At that time again we have register our application.
Can't we register ocx controls in common locations i.e independent of servers.
If anybody know please help me..
Thanks
Kumar
|
|
|
|
|
i'd think not, i would have thought that the ocx file needs to be registered on the computer thats using it
Unless you have one pc with ocx's and write some sort of remote accessing software. - dcom corba or the like.
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Hi All,
I trying to create temporary storage using the following code:
LPSTORAGE lpTempStorage;
sc = ::StgCreateDocfile(NULL, STGM_DELETEONRELEASE|STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_CREATE, 0, &lpTempStorage);
However, it always return STG_E_MEDIUMFULL. From documentation STG_E_MEDIUMFULL means that there is insufficient space to complete operation. I am just wondering, what I did wrong?
It was working before and just suddenly throws an error. The free diskspace is still plenty (about 4Gigabytes). Any idea what goes wrong?
Thanks...
Samin Thomas
|
|
|
|
|
I am develoing one application which is fully depend on system time. But as i cannot restrict the system users from editing the system time, it will cause problem to me.
Is there any way from the application to trap the reseting the system time.
Ranjish
|
|
|
|
|
check for WM_TIMECHANGE message in msdn.
There is no spoon.
mail
|
|
|
|
|
Suhredayan,
But my question is how I can monitor when ever another application or user updates the sytem time
|
|
|
|
|
Ranjish,
WM_TIMECHANGE message is broadcasted to all top-level windows by any application which updates the system time. So if you write an application which can recieve top-level window messages and handle WM_TIMECHANGE message out there, then you will also get notified on system time update.
There is no spoon.
suhredayan
|
|
|
|
|
If the users PC has a Internet connection you could query Internet Time Server (NNTP I think this is). You can also get time info from HTTP requests.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
i'm a beginner and i have to write a program that contains buttons that draw a square and a circle and a clear button but i cant use a GUI application, any ideas on how to approach this. i have no idea how to create a button
alp
|
|
|
|
|
|
glowskull03 wrote:
i have to write a program that contains buttons that draw a square and a circle
Check out Rectangle() and Ellipse() respectively.
glowskull03 wrote:
...but i cant use a GUI application
Meaning that you are not allowed to, or that you do not know how?
glowskull03 wrote:
i have no idea how to create a button
How about CreateWindow("Button", ...) ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello there! Does anyone experienced a communication problem between Win2003 and Win2K? I have this program using server and client socket (using CSocket). The server is Win2003 and the clients are WinXP and Win2K. I have this LED indicator (bitmap image) wherein it indicates if there is a communication between server and client. If the LED is green there is connection and if red there is no connection. It works fine if the connection is between Win2003 and WinXP. But the problem occurs if it is between Win2003 and Win2K. The Win2K is updated to service pack 4. Am I missing an update or something?
Thank you very much who can give me support.
|
|
|
|
|
this isnt a programming question this is more admin type stuff
unless you have code for us to look at
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Hi
I want to load controls like Buttons and edit boxes to tree view, so that I can expand and collapse the controls on the GUI. Or else without using a tree view is there any other way to get this effect. I am unable to do this. Can anyone please help me to do this.
Thanks
Madhavi
|
|
|
|
|
There are two descriptions about the C memory map, which makes me confused. I wonder which one is the correct memory map in C. Should the stack and heap come on top of the program codes? Or should the program codes and global variables on top?
Map 1 is correct? or Map 2?
Thanks
/////////////////////////////////////////////////
--- Map 1 ---
Described in "C - The Complete
Reference" by Herbert Schildt
+-----------+
| Stack
| |
| v
+-----------+
| ^
| |
| Heap
+-----------+
| Global
| variables
+-----------+
|
| Program
| codes
|
+-----------+
/////////////////////////////////////////////////
--- Map 2 ---
Described in "Mastering Algorithms
with C" by Kyle Loudon
+-----------+
|
| Program
| codes
|
+-----------+
| Global
| variables
+-----------+
| stack
| |
| v
+-----------+
| ^
| |
| Heap
+-----------+
////////////////////////////////////////////////
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|
|
The memory layout depends on the OS and the compiler. Each diagram may be correct for a particular OS/compiler combination. The C standard doesn't say which way the memory should be mapped.
|
|
|
|