|
Ths rdculs omsn of ltrs is strtng 2 gt on my nrvs.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Whats meaning of
John Simmons / outlaw programmer wrote: Ths rdculs omsn of ltrs is strtng 2 gt on my nrvs.
|
|
|
|
|
WhiteSky wrote: Whats meaning of
John Simmons / outlaw programmer wrote:
Ths rdculs omsn of ltrs is strtng 2 gt on my nrvs.
I'll take a guess:
This ridiculous omission of letters is starting to get on my nerves.
|
|
|
|
|
Thank you for your answer
|
|
|
|
|
hi all
I had created two Satellite DLLs corresponding to two resource files in same project.
Any body have an idea about how to load two satelite dlls at same time to my exe at run time
regards,
aji
|
|
|
|
|
Try this link may it'll help u
http://msdn2.microsoft.com/en-us/library/8fkteez0(VS.71).aspx
Regards,
Pankaj Sachdeva
|
|
|
|
|
CMyApp::InitInstance()
{
// one of the first things in the init code
HINSTANCE hInst = LoadLibrary(“myres.dll”);
if (hInst != NULL)
AfxSetResourceHandle(hInst);
// other initialization code would follow
.
.
.
}
This will help u loading the satellite dlls
Regards,
Pankaj Sachdeva
|
|
|
|
|
Thank you.
It seems to be useful for me
|
|
|
|
|
Hi
I Wrote a program to Communicate with a Serial Port in MFC.The problem is if i use WriteFile and ReadFile immediately i get the correct data.But if i Start a thread and use WaitCommEvent then the Program gets stuck up in WriteFile.
I hav filled the DCB structure too.
what could be the problem with WriteFile??
PS:I am not using Overlapped I/O
Any Links Would do Fine.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
I think you have to post the relevant code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
QuickDeveloper wrote: if i Start a thread and use WaitCommEvent then the Program gets stuck up in WriteFile.....I am not using Overlapped I/O
If you're not using overlapped I/O, you can only issue one request at any given time to the driver. If you issue another it will block waiting for the previously issued request, which is exactly what happens in your case: ::WaitCommEvent() is waiting for something to happen before returning while blocking the ::WriteFile() call.
If you're writing an application that is supposed to issue both read and write requests, you should only consider the overlapped alternative.
Have a look at an example on overlapped I/O here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks Roger ...i am using Overlapped I/O and it's Working Fine.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
I want to get a particular testsuite for execution of cppunit testcases in vc++
|
|
|
|
|
|
Hi,
I am new to vc++.
I am trying to creat file using the following code.but it is not creating the file.INVALID_HANDLE_VALUE is returned. what may be the reason for the failure.
hFile = CreateFile(m_storagePath,GENERIC_REA|ENERIC_WRITE, FILE_SHARE_READ, NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
if (hFile == INVALID_HANDLE_VALUE)
{
AfxMessageBox( "File cant be created ");
//return 0;
}
Help Ever Hurt Never
|
|
|
|
|
Call GetLastError() to get the error code, when CreateFile() returns INVALID_HANDLE_VALUE.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
thanks for your reply.
i tried by including
DWORD dw = GetLastError();
after creating the file . and its returning 0X0000.
and dont know what the return value indicates?
please guide me.
Help Ever Hurt Never
|
|
|
|
|
Shouldn't happen. Does your code look something like this?
if (hFile == INVALID_HANDLE_VALUE)
{
DWORD dw = GetLastError();
AfxMessageBox( "File cant be created ");
}
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
Could be a lot of things. What is in m_ storagePath ? Does the file exist? Do you have read and write access to it? Does some other process have it open and it's only shared for reading?
|
|
|
|
|
you can get the error string by using FormatMessage() . Just change the code to as shown below. This will display the error string corresponding to that of error code.
hFile = CreateFile( m_storagePath,<br />
GENERIC_READ|GENERIC_WRITE, <br />
FILE_SHARE_READ,<br />
NULL,<br />
OPEN_ALWAYS,<br />
FILE_ATTRIBUTE_NORMAL,<br />
0);<br />
<br />
<br />
if (hFile == INVALID_HANDLE_VALUE) <br />
{ <br />
LPVOID lpMsgBuf;<br />
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | <br />
FORMAT_MESSAGE_FROM_SYSTEM | <br />
FORMAT_MESSAGE_IGNORE_INSERTS,<br />
NULL,<br />
GetLastError(),<br />
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), <br />
( LPTSTR ) &lpMsgBuf,<br />
0,<br />
NULL );<br />
<br />
cout << endl << (LPCTSTR)lpMsgBuf << endl;<br />
<br />
LocalFree( lpMsgBuf );<br />
}
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
How can we change the size of the splitter bar in a splitter window?
- NS -
|
|
|
|
|
Derive a custom class from CSplitterWnd class. In the constructor of derived class change the value of m_cxSplitter and m_cySplitter. Simply doing this will slove your problem and use the derived class instance
Do your Duty and Don't expect the Result
|
|
|
|
|
Thanks a lot...
I found some other useful variables too...
- NS -
|
|
|
|
|
NS17 wrote: I found some other useful variables too
Just curious...
|
|
|
|