|
Hai,
I am having two applications that run simultaneously. One program writes data to a file and the other program reads data from that file itself and performs some operations based on the value of that file.The problem is that since both are using same file there will be a chance to request to read the file while the file is writing.Is there any method 2 use a single file for two programs.
|
|
|
|
|
Use CreateFile to open the file and specify the dwShareMode parameter as FILE_SHARE_READ|FILE_SHARE_WRITE .
|
|
|
|
|
|
|
hi!
i will the remote sensing row image generate whit c or c++ or delphi . row image formate is bsq.
please help me for this project!!!
Thanks.
|
|
|
|
|
What is meant by remote sensing an image?
|
|
|
|
|
Hi all,
please help me to tell about the the String value of Ctrl+Z.
please tell me what string i use in place of Ctrl+Z.
thanks in advance.
|
|
|
|
|
What is meant by string value of Ctrl+Z?
|
|
|
|
|
i want to use it over serial port so i need this.
i mean How to write ctrl-z to a serial port?
|
|
|
|
|
The value for CTRL-Z (^Z) is 26 (decimal). It is often used as an end-of-file marker (DOS).
You might also find useful to know that CTRL-A (^A) is 1 and that all the others, i.e. CTRL-B through CTRL-Y characters fall in between (CTRL-B is 2, CTRL-C is 3, and so on).
char c[2]; c[0] = (char)26; c[1] = 0;
CString cstring;
cstring = CString( c);SkyWalker
|
|
|
|
|
|
Try this -
CString cs;
cs.Format(_T("%c"), 26);
|
|
|
|
|
Thanks for all ur support its done now.
its real value for serail port is "\x1A\r\n"
|
|
|
|
|
Yes 0xA1 is 26 in decimal.
|
|
|
|
|
0x1a = 26
0xa1 = 161"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
i think Ctrl+Z key combination genrates an end of file marker character which is defined by the EOF macro.
--Cool_Dev--
|
|
|
|
|
Do you want to know the value of Ctrl+Z?
It's so easy!
You don't need to ask anyone,you don't need the characters table.
What you need to do is:
Run ComTrace, then type the "Ctrl+Z" in HyperTerminal,It's ok!
You can get '1A'
http://www.armecos.com/en/comtrace.html[^]
|
|
|
|
|
hi all
I am using copy command in createprocess() but this is not working
I am writing following code but this is not working
AnsiString cmdpath = "copy /b c:\\000.mp3+c:\\001.mp3 c:\\out.mp3";
PROCESS_INFORMATION pInfo;
STARTUPINFOA sInfo;
DWORD exitCode;
memset (&sInfo, 0, sizeof(sInfo));
sInfo.cb = sizeof(sInfo);
sInfo.cb = sizeof(STARTUPINFOA);
sInfo.lpReserved = NULL;
sInfo.lpReserved2 = NULL;
sInfo.cbReserved2 = 0;
sInfo.lpDesktop = NULL;
sInfo.lpTitle = NULL;
sInfo.dwFlags = 0;
sInfo.dwX = 0;
sInfo.dwY = 0;
sInfo.dwFillAttribute = 0;
sInfo.wShowWindow = SW_FORCEMINIMIZE ;
ShowMessage(cmdpath);
CreateProcessA(NULL, cmdpath.c_str(), NULL, NULL, FALSE,NULL, NULL, NULL, &sInfo, &pInfo);
if(WaitForSingleObject(pInfo.hProcess,INFINITE)== WAIT_OBJECT_0)
{
ShowMessage("Success");
}
|
|
|
|
|
CreateProcess requires an executable file's path. You may have to use cmd.exe and pass "copy" as the commandline argument.
|
|
|
|
|
The process name could be "cmd"
and its parameter - "/c copy ..."
|
|
|
|
|
Thanks Eugen for reply
now its working
|
|
|
|
|
But why don't you just copy the file from within the program? Now you'll run a Cmd to do the copy. Bet your language can copy the file with just 1 line of code....
|
|
|
|
|
Use the CopyFile [^] Win32 API function instead.
|
|
|
|
|
Hi,
I'm using MFC MDI application i'm doing drag and drop operation from one view to the another view, and my question is when dragging i need to drag image of the source item to the destination item. I tried this but when mouse enters in to the next view it only shows the mouse pointer.
How to copy image from one view to the another when mouse enter in to the next view?
Thanks,
Mark.
|
|
|
|
|
The dragged image is not a cursor but a property of the control.
This control (your CTreeCtrl) and not another knows how to draw it
You could overwrite this behavior
to use the different cursors of the classical dragging only,
without any private images...
|
|
|
|