|
Programm3r wrote: Do you have any advice / site / source?
Yes, just have the application send the DLL a window handle instead of a caption.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanx for the advice ..... I'll see if i can figure somting out.
Programm3r
|
|
|
|
|
Hi,
Iam sending data to ComPort and using RS-232 cable Iam trying to receive the data at the other end.
I set the properties also(BaudRate,Stop Bits,Parity etc..)both at sender and receiver.
Sending End:
char dataToSend[100];
dataToSend = "asdfsdf ....";
result = WriteFile(handlePort,dataToSend,99,&length,NULL);
Receiving End:
char dataReceived[100];
result = ReadFile(handlePort,dataReceived,99,&length,NULL);
cout << "Data Received = " << dataReceived<
|
|
|
|
|
Ayesha Farheen wrote: result = ReadFile(handlePort,dataReceived,99,&length,NULL);
What is the value of result ? If it is FALSE , what is the return value of GetLastError() ?
What is the value of length ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
At both sending and receiving ends , its returning 1 (TRUE).
Ayesha
|
|
|
|
|
And length? What happens if you flush the buffer?
|
|
|
|
|
Before sending the data or receiving it , Iam flushing the buffer using following method.
int nReturnValue = PurgeComm(handlePort_,PURGE_TXCLEAR | PURGE_RXCLEAR);
And the return value is non-zero, i.e flushing succeded.
I checked both, with and without PurgeComm(). But still its not working.i.e Output is same for both.
And the length received is coming as 0.
I didnt understand one thing, Iam sending the data only ones, but why its receiving it those many times and why data is not coming?
Thank You.
Ayesha
-- modified at 2:54 Tuesday 11th July, 2006
|
|
|
|
|
Flush the buffer after sending the data using FlushFileBuffers. This ensures that nothing gets stuck in a buffer waiting to send.
If you are sending the data only once but the remote end is receiving it many times, make sure you have your line enders right -- it could be that the remote end is getting confused. Try 13 10, just 10, and just 13 -- I can never remember which of those are the usual line enders.
earl
|
|
|
|
|
Ayesha wrote:
result = WriteFile(handlePort,parameterNCheckSumData,99,&length,NULL);
What is parameterNCheckSumData? Should'nt it be dataToSend.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Yes , that is dataToSend its not parameterNCheckSumData. But thats just a char buffer name. I want to know why data is not being received properly.
Thanku You.
Ayesha
|
|
|
|
|
Hi,
What type of I/O are you performing Overlapped or Non-overlapped?
Have you set timeouts? If not, Try setting timeouts.
If possible post some code.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hello,
I added an ActiveX to my application but when I gave the program to other people the activeX isn't there...
How can I add/paste the ActiveX to my program so if i'll give it to another people it will work.
SnaidiS(Semion)
|
|
|
|
|
It has to be registered in others systems too,to whome u give,then it will work..
|
|
|
|
|
|
u must supply the activex alone with ur exe and Register that exe in the target mechine. Its good if u appoint a Installer for this purpose.
nave
|
|
|
|
|
How can I get the handle of object?
SnaidiS(Semion)
|
|
|
|
|
regsvr32 [path_to_your_activex_dll]
|
|
|
|
|
I wrote a code to register the activeX but when I'm giving the program to anither computer it can't find the activeX
SnaidiS(Semion)
|
|
|
|
|
try using IPropertyBag interface.
Regards
Abhishake Lahare
|
|
|
|
|
Sorry implement IPropertyBag for your control
Regards
Abhishake Lahare
|
|
|
|
|
Did you actually give them the .ocx file?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
Here I have a problem that specified port is working or not ie when we give a port number then it should give that port is running or not.plz anybody help to me
#sankar#
|
|
|
|
|
runing in the sense..do u mean already in use..?
|
|
|
|
|
thanque for ur reply
but i want display it is running or not.
for example if i give 8080 then program will give corresponding port is running or not.plz kindely help me
#sankar#
|
|
|
|
|