|
pyhtang1 wrote:
"cannot find the DLL MFC42D.DLL", what should I do ?
The 'D' at the end of the DLL name signifies that you are trying to run a debug built application on the target machine.
Recompile your program in release mode and it should run OK.
(most machines should have the Microsoft runtime libraries installed)
I Dream of Absolute Zero
|
|
|
|
|
Build your project in Release mode.
It can be done as follows
build/set active configuration.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Hello,
I have an application which hooks up the keyboard of a given process by injecting a DLL into the process.
Now in that DLL, I have a (shared) char buffer which stores each keystroke. I am trying to get the buffer from my application, which is failing! Is there anything I am missing here? :
Here's how my code goes:
<code>
...
#pragma data_seg(".WBA")
char g_chBuffer[0x101];
#pragma data_seg()
#pragma comment(linker, "/section:.WBA,rws")
...
BOOL _declspec(dllexport) __stdcall GetAppBuffer(char *chfBufferOut)
{
if(chfBufferOut == NULL)
{
return FALSE;
}
char *pchBuffer = g_chBuffer;
while((*chfBufferOut++ = *pchBuffer++) != 0);
return TRUE;
}
...
LRESULT _declspec(dllexport) CALLBACK GetKeyboardMsgs(int nCode, WPARAM wParam, LPARAM lParam)
{
...
static char *pchBuffer = g_chBuffer;
...
ToAscii(wParam, nScan, chKeyState, &wTemp, 0);
*pchBuffer++ = char(wTemp);
...
}
</code>
In my application code, where I am calling the function GetAppBuffer() :
...MyFunction()
{
...
static BOOL (__stdcall *fpGetAppBuffer)(char *) = NULL;
if(m_hmodDLL != NULL)
{
memset(chBuffer, STRING_TERMINATOR, 0x101);
fpGetAppBuffer = (BOOL (__stdcall *)(char *)) GetProcAddress(m_hmodDLL, "GetAppBuffer");
}
...
char chBuffer[0x101];
memset(chBuffer, 0, 0x101);
fpGetAppBuffer(chBuffer);
....
}
</code>
Please reply with any of your comments/suggestions. Is there anything wrong, that I am doing here? Please write back even if you feel the question/code is not clear/insufficient.
Thanks!
Rgds,
Nirav
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
Hi!
I wanted a tree control with different back color, line color, and [+/-] icon. To archive the former, I tried CTreeCtrl::SetBkColor and CTreeCtrl::SetLineColor, then it works. But there is trouble with the default [+/-] icon.
I wanted the [+/-] inside a circle. I created 2 icons in resource for that, then tried CWnd::SetIcon big/small for +/-, but the default icon never changes. What should I do?
Thanks,
Sovann.
|
|
|
|
|
Check this article:
QA: How can I change the background color of a Tree Control?[^]
It is not only about changing the background color, it also addresses your proble and although it was written for the Pocket PC, I think you will be able to use this code on the desktop as well.
Regards,
João Paulo Figueira
|
|
|
|
|
Your code is definitely very helpful. Now I can customize the [+/-] icon.
Thanks,
Sovann.
|
|
|
|
|
hope someone can help, thank
|
|
|
|
|
I've been writing a DXi .dll (Sound module) using .Net 2003 and am just about to release Beta 1 for testing. However the damn thing won't register on any machine that doesn't have .net 2003 installed. The documentation implies that MFC71.dll and MSVCR71.dll will be needed in the distribution.
So, I'm trying to get the MS deployment tool working. It's still no go. The installation fails trying to register the .dll file. I'm presuming I need to register MFC71.dll etc ?
Any clues ?
Andy C
|
|
|
|
|
Hi
previously I asked how to convert string to unsigned long now the reverse is required. How would I convert unsigned long to string?
HAVE: unsigned long cnt = FFFF0000;
REQUIRE: a string with the value "FFFF0000"
suggestions much appreciated
Kind Regards
Kevin
|
|
|
|
|
char acBuffer[128]={0};
sprintf(acBuffer, "%d", uLong);
Check the format specification for more info
u might need %ud
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
My string is type CString not a character array. Any Ideas??
|
|
|
|
|
CString temp;
temp.Format("%ud", uLong);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
CString text;
text.Format("%ux", cnt);
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
I assume you are using MFC.
cnd = 0xFFFF0000;
CString strValue;
strValue.Format("%X",cnt);
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
|
You could use the standard library:
unsigned long cnt = 0xFFFF0000;
TCHAR tszString[16]; // Arbitrary size
_stprintf(tszString, _T("%8.8X"), cnt);
Sorry, just read your CString post:
CString strString;
strString.Format(_T("%8.8X"), cnt);
|
|
|
|
|
How To Create new "DBase" database without entering in ODBC Administrative tools.
What exactly i want - is to create new dbase file in any directory i choose, and do it in my programm. And the full story is about creating ESRI shape file. It needs 3 files, one of them is "*.dbf",i have to convert from my dataformat to ESRI Shape format. And the lase problem is in creating DBase file!!!
Please help...
|
|
|
|
|
In order to create a new dBase file, you must have the appropriate program, in this case, dBase PLUS would sound suitable. Alternatively, you can try to use the dBase SDK provided on their home page, and see if it can create an empty database file for you. I doubt it, however.
The ODBC is just a data connectivity method, that allows you to create DSN (Data source names) for existing data sources. You cannot create new data placeholders through ODBC, only DSN definitions that can be used to access the existing sources.
Naturally, you could try searching the Web for a description about the dBase *.dbf file format and then attempt to convert your old dataformat into a format suitable for ESRI Shape format. Checking ESRI homepage might also be helpful.
But, if you need to reliably create a new dBase file, you must have the actual program.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
See the following code snippet on how to create a dBase III compatible file.
onwards and upwards...
|
|
|
|
|
Hi ,
Iam trying to display an image to screen which contains Lines drawn at 45 degrees(Slanted Lines)to screen .I display it to screen by calling the "PlayEnhMetaFile" Function..When I run my application & load this "Image",it is drawn correctly to the screen .But when I scroll the Image using scroll bars,the lines appears like ZigZag,not slanted any more.This behaviour comes only when the the image,goes out of the client area region or screen & comes back again while doing the scrolling.There is no problem when I Draw the image to the screen at a different position, so that It doesnt go awayfrom the clientarea while scrolling .Then the lines are not appearing as ZigZig.
Any idea what could be the cause....
Thanks
|
|
|
|
|
Hi all,
How can I incorporate external third party DLLs (don't have source code) into the final output .exe file ? (as I want to distribute the
software in one single file)
Thanks
|
|
|
|
|
simply not possible, only thing you can do is loaded it dynamically and use its apis, that too only if you know what are its calling convention, its return type and parameter list, you need a header file.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Ow I think you can do it, just check on google for "DLL to Lib", it's a tool to convert DLLs into LIB files, then you can link the produced LIB code statically inside your exe
Cheers
GuimaSun
www.nexsun.com.br
|
|
|
|
|
One possibility:
Embed the DLLs as custom resources into your executable. The first time your exe runs, it needs to extract and write the DLLs out to the same directory as your application before using them. This would mean you have to use dynamic linkage.
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Darn, Roger... you beat me to it! Darn phone call!
onwards and upwards...
|
|
|
|