|
Can those be used with serial communications, or are they for sockets only?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Then why are you using them with a serial port?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Actually, if i would like to store the data of the "lData" parameter when lnewData[]={.....}(soem bytes) in storearray[], the how could i do? Is this correct??
if(lnewdata[8]==({..,..,..,..,..})
{
BYTE storearray[1024]= lData;
}
can i work so with a string???
|
|
|
|
|
chaitanya22 wrote: Is this correct??
I doubt it.
chaitanya22 wrote: if(lnewdata[8]==({..,..,..,..,..})
What is lnewdata ? Are you comparing or (supposed to be) assigning?
chaitanya22 wrote: BYTE storearray[1024]= lData;
What is lData ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
BYTE lnewData[8]={0x02, 0x00, 0x02, 0x00, 0x20, 0x24, 0x34,0x08}
lnewlength= recv(lnewSocket,(char*)lData,1024,0);
if(lnewData[8]=={0x02, 0x00, 0x02, 0x00, 0x20, 0x24, 0x34,0x08})
{
BYTE storearray[1024]=lData; //i would like to store the array of recieved bytes in storearray[1024]
}
chaitu
|
|
|
|
|
chaitanya22 wrote: if(lnewData[8]=={0x02, 0x00, 0x02, 0x00, 0x20, 0x24, 0x34,0x08})
What is this? Try:
BYTE compare[8] = {0x02, 0x00, 0x02, 0x00, 0x20, 0x24, 0x34,0x08};
if (memcmp(lnewData, compare, 8 * sizeof(BYTE)) == 0)
{
memcpy(storearray, lnewData, 8 * sizeof(BYTE));
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello!
When I compile the release version of my application, it depends on MSVCP80.DLL and MSVCR80.DLL. Unfortunately this prevents the application from being run on a computer, where these runtimes aren't installed.
How can I remove these dependencies? Any way to statically link to MSVCP80.DLL and MSVCR80.DLL?
I assume there is some linker switch that does this and I've overlooked it?
Many thanks in advance and best regards
Dominik
<small>and</small;gt;
<code>__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Dominik Reichl wrote: Any way to statically link to MSVCP80.DLL and MSVCR80.DLL?
Do you have the corresponding .lib files?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I actually don't know. I got Microsoft Visual Studio 2005 Standard Edition.
Best regards
Dominik
<code>_outp(0x64, 0xad);<="" code="">
<small>and</small;>
<code>__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Your denglish is unoverseebar. Try to reencode what they do! But dont be sad - it's easier to do that than understand M$-code.
|
|
|
|
|
mbue wrote: Your denglish is unoverseebar.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Go to the project settings.
It should open in Configuration Properties|General.
Next to "Use of MFC", make sure it says "Use MFC in a Static Library". (If not using MFC, don't worry, you still need to verify another place that applies even for all projects.)
Select C/C++.
Select "Code Generation".
Make sure "Runtime Library" doesn't have DLL in it' change if needed.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I need to run exe file from MFC app wich accepts data thru stdin.
How to pass that data to it and get its results from stdout. I've seen this link but it only handles reading results.
http://www.codeproject.com/cpp/9505Yamaha_1.asp
9ine
|
|
|
|
|
Of those applications that do it, most read from stdin and write to stdout? What exactly is it that you are trying to do?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I want to write numbers to stdin and read them from stdout after console is executed. This code on the link works with pipes, and I've implemented it for running a process and reading its output.
But when to write to stdinput pipe before or after createprocess() function?
9ine
|
|
|
|
|
when you write a very simple program you will need links some lib so that it can run.
so I want to know which lib will need on PC WINDOW platform .
main()
{
int i = 0;
}
the program need what lib to link?
even I create a plain/empty project with vc6(window console), it link many lib for me ,all is a must?
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/testLib.pdb" /debug /machine:I386 /out:"Debug/testLib.exe" /pdbtype:sept
-- modified at 9:00 Tuesday 28th February, 2006
|
|
|
|
|
derek7 wrote: ...all is a must?
No, the only one that will be loaded at runtime is kernel32.dll.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
but I remove all lib it also work.
#include <iostream>
main()
{
int i = 0;
std::cout<<"t\n";
};
the code work without any lib( no kernal.dll )
so I guess the c++ standard lib is linked unapparently
but another question appear :if I DO NOT use cout how to unlink the c++ standard lib ?
BTW: Is c++ standard lib c runtime lib?
-- modified at 9:44 Tuesday 28th February, 2006
|
|
|
|
|
derek7 wrote: the code work without any lib( no kernal.dll )
Even though you removed kernel32.lib from the linker options, kernel32.dll is still "loaded" for your program. Look at the debug window to observe this.
derek7 wrote: BTW: Is c++ standard lib c runtime lib?
Are you referring to msvcrt.dll?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
It's a very unusual question. But i can be wrong. Don't panic to link all the default .lib's. There is no more code as you use (DevStudio does so). But further you can remove all .lib's and bind only libs you want. Sample:
#pragma comment ( lib, "XYZ" ) // thats what i do
M$ itselves has prepared a .csv file to examine what .lib you need. You can find it at:
<xyz>\MSDEV\LIB\WIN32API.CSV
oder <xyz>\Microsoft Visual Studio\VC98\Lib\WIN32API.CSV
and so on.
|
|
|
|
|
//vc6
#include <assert.h>
main()
{
assert(0);
}
when I press F5 a assert window pop and I press retry it should be break at assert(0);but it pop a window again: Find Source , Please enter path for CRT0MSG.C , what is wrong?
|
|
|
|
|
|
I think it is because assert() goes to the finest details.
What you need to do is:
In the Variables tab, change the Context combobox to your function, which should be:
main(int char**)
this is this.
|
|
|
|