|
point 1) I only have the sourcecode from the app which needs to get the string. A friend of mine wrote a program in delphi but I don't have access to the source. So I told him just to input the WM_COPYDATA function into his app in order to send me necessary data from his app into my app
point 2) MSDN says: An application must use theSendMessage function to send this message, not thePostMessage function.
I tried with PostMessage and it did not work
point 3b) what happens, if the function times out? Will no application get the WM_COPYDATA message?
|
|
|
|
|
1) He should be able to get your apps hwnd if he knows the window title (or scans the task list for the module name.
2) I guess I can understand that. Postmessage returns immediately, so there's a real good chance that the receiving app won't have time to process the string.
3b) In the event of a timeout, Sendmessage (and SendMessageEx) both return FALSE.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
1) use the clipboard
2) create a temp file
3) use the registry [dont forget to delete the temp keys you make]
|
|
|
|
|
You forgot:
4) Use WM_COPYDATA.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
6) Named pipes
7) Memory-mapped files
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
8) RPC
Carlos Antollini.
|
|
|
|
|
9) UPS
10) Federal Express
11) US Postal Service
|
|
|
|
|
Its true!!!
The use will be in this mode...
::SendMessage(yourAddress, theBox, company, type);
Carlos Antollini.
|
|
|
|
|
You guys are crazy
Thanks to everybody for his help
|
|
|
|
|
Yeah...
Nish
|
|
|
|
|
how i have to detect dialog control i want to disable is not focused one?
(i have to move to nextdlgctrl than)
i see no getactdlgctrl or similar
resp. main problem is
GetDlgItem(ID_MYCONTROL)->Enablewindow(FALSE);
not moves to next control automaticaly (has to?)
i have no special nextctrl handler
thanks for reply
t!
|
|
|
|
|
and it seems disabling actual button it brings problems with dialog hotkeys
disabling - during already opened dialog
t!
|
|
|
|
|
Have the following code as part of my DLL running on NT Workstation. For some reason it opens the registry key OK but can't Query the value. The value is definately in the registry. Interestingly, when I cut and paste the code into a standalone .exe it works fine. Anyone any ideas...is it a problem with UNICODE or similar?
//GET REGISTRY INFORMATION FOR DATABASE NAME
//
HKEY hKey;
if (ERROR_SUCCESS == RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\COMPANY\\PRODUCT", 0, KEY_QUERY_VALUE, &hKey ) )
{
DWORD dwBufLen;
char szDBName[256];
if (ERROR_SUCCESS == RegQueryValueEx( hKey, "DatabaseName", NULL, NULL, (LPBYTE) szDBName, &dwBufLen) )
{
OtherFunction(szDBName);
}
else
{
OtherFunction("\\default\\Data\\MyDatabase");
}
RegCloseKey( hKey );
}
else
{
OtherFunction("\\default\\Data\\MyDatabase");
}
Cheers
Steevie
|
|
|
|
|
DWORD dwBufLen;
char szDBName[256];
You need to init dwBufLen to the size of your data buffer so the API knows how large your buffer is.
char szDBName[256];
DWORD dwBufLen = sizeof(szDBName);
--Mike--
http://home.inreach.com/mdunn/
If there's something strange / in your VC code / Who you gonna call? / Ghostbusters!
your with and
|
|
|
|
|
Hi all,
Does anyone know how I can find out what is available from a DLL in code? I can find out what DLL's an app/dll requires (cause I got the code from MSDN ), but I'd like to take this a step further and find out what the DLL offers and what gets used by a calling app/dll. Much like the way Dependency Walker does it...
Cheers,
Dylan
|
|
|
|
|
if you right click on the dll in the explorer there comes this menu up.. if you use the second function ( under "open with" should be sthing like "view item".. i don't know that exactly cause i am using the german version of the os) you should see all the exportet functions of this dll...
hope this works for you...
bernhard
""Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
Thanks for the note, but I'm trying to do this in code
Any suggestions anyone?
|
|
|
|
|
This is kind of tricky to do. An exported function can be represented by a name or an ordinal. If they use an ordinal, all you have is the integer value. If it's a name, it could be mangled.
All exported functions are written to the exports table. the exports table contains the name (and address to the entry point) for each exported routine.
Look on MSDN for articles about the dumpbin utility.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks very much John, this has given me a good starting point
|
|
|
|
|
Hi all,
I need to get the version of a font file (.ttf).
It is possible to see the version with the
Windows font viewer so I guess it must be
possible to get the file version.
Does anyone know how to get the font file
version programmatically with a API call
or something like that?
Thanks for your help in advance!
Jens Doose
|
|
|
|
|
I have a strange pb with my application:
My app is a dlg application in which i have to use a ADO connection with an Access database:
CString strTemp;
strTemp.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\SwaptionCalculator\\ParameterFile.mdb;");
_bstr_t strCnn(strTemp);
In the last line there is a pb i have never met before today(i would like to specify that this lines haven't be changed since i have started my application, and it runned very well before today!)
So, if i try to run my application, a message arrives, telling me this thing:
"unhandled exception, ....0x00000005. Access Violation"
This happened when the app is at line of the following declaration:
_bstr_t strCnn(strTemp)
So, i would like to know what is the problem, and i thank in advance people who can help me
gerald
|
|
|
|
|
Have you tried debugging into the _bstr_t constructor. I can't believe that line can be giving that error. What other code have you changed recently? My guess is something has corrupted memory.
Michael
|
|
|
|
|
it's exactly what i think sthg corrupt memory, and i have changed nothing in my code which could break it. But, ihave tried to put a breakpoint in the _bstr_t constructor, which could initialize a _bstr_t object from a char* object, i have put this break point at the beginning of the constructor, and the application failed at this moment
|
|
|
|