|
Hello,
I'm trying to find the 16-bits library "safxcrd.lib" for visual c++ 1.52, but without succes. Can anyone help me with this?
Thanks,
Pieter
|
|
|
|
|
I'm going way out on a limb here, but I think you had to build safxcrd.lib yourself. I also seem to recall that it was a really bad idea since it created problems if far pointers weren't defined correctly (it used the small model for both data and code.... my eyes are getting blurry... small...model... large...model... I... can't... think... aaaahhhhh.....)
|
|
|
|
|
hello,i need help.
i try to use SetWindowHookEx() function to hook keyboard(WH_KEYBOARD) via DLL .it works when my program is activate (show "wParam" in messagebox)but when i click to any running program(my program is deactivate now) it not works.
who can help me ,please
thanks so much
|
|
|
|
|
The last parameter (dwThreadID) in SetWindowHookEx should be zero.
If this parameter is zero, the hook procedure is associated with all existing threads running in the same desktop as the calling thread.
|
|
|
|
|
I don't knosw what it can be, I use this and it works for me... I export one f(x) in the DLL that is called bActivarHook(bool bActivar); what means bActivateHook(bActivate); (it was in catalan ) and inside that f(x) I've placed this code:
DLLSCT_API bool bActivarHook(bool bActivar )
{
if(bActivar == true)
{
hHookTeclat = SetWindowsHookEx(WH_KEYBOARD_LL, HookTeclatLL, hInstDLL, NULL);
return (hHookTeclat != NULL);
}
else
{
if(hHookTeclat != NULL)
{
UnhookWindowsHookEx(hHookTeclat);
return true;
}
else
{
return false;
}
}
} And I call this function from my app (In my case the caller app is a service, but it must do the same...)
well hope this helps...
|
|
|
|
|
I created a program that opens and saves the file using CFileDialog class.
I created a program that opens and saves the file using CFileDialog class.
However, whenever I save some files using this program, files always are hidden and saved as system files.
So, I checked the attributes of CFileDialog of my code.
I only used OFN_OVERWRITEPROMPT in dwflags.
Does CFileDialog class originally save files wih those attributes (hidden and system files)?
Please help me.
I don't want to save files as hidden and system files.
Thanks in advance.
|
|
|
|
|
CFileDialog doesn't save the files at all - it just allows the user to select the file to save.
You normally do something like this:
CFileDialog dlg( FALSE, ... );
if ( dlg.DoModal() == IDOK )
{
// Do the save here
CFile f( dlg.GetFilePath(), CFile::modeCreate|CFile::modeWrite|CFile::shareExclusive );
// Write the file...
f.Close();
}
Post the code that actually is performing the save function (after the CFileDialog's DoModal() method returns), and we'll see if we can spot anything wrong.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Thank you for kind explanation.
It was totally my fault.
Actually, I used another header file to write into file using createfile and there were hidden/system attributes in #ifdef~#endif.
Thank you!!!
|
|
|
|
|
I am creating an internal app framework (for company apps).
Using C++ will facilitate my task but I have to make the framework / library usable for C programmers.
Any ideas?
|
|
|
|
|
use extern "C" into fn prototypes (of course they can't be class members)
t!
.h:
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
int my_fn(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
|
|
|
|
|
Thats it! Thanks. I thought I had to specify function call argument passing (__cdecl, __fastcall, etc) just as Dr John Maddock's Regex++ library.
|
|
|
|
|
It's often a good idea to be specific about the calling convention when exporting from a DLL; if the client program is compiled with a different default convention (using the /Gd, /Gr or /Gz switches) from your DLL it either won't link correctly or will potentially crash at runtime, due to erroneous stack manipulations.
__stdcall is marginally smaller (typically one ADD instruction) at the call site than __cdecl, but __cdecl can handle variable argument lists and is marginally smaller in the function implementation. The ADD instruction is used to reset the stack pointer after the call back to where it was before the compiler started PUSHing arguments. More info in John Robbins' excellent Debugging Applications books (I just bought the most recent one, Debugging Applications for Microsoft .NET and Microsoft Windows - there's a mouthful).
This only applies to desktop Win32 running on IA32 processors; Windows CE on IA32 always uses __cdecl, while other processors only have a single calling convention. Most RISC processors use a calling convention sort of like __cdecl but with the first n arguments passed in registers. This is also true of AMD64 (first 4 arguments passed in RCX, RDX, R8, R9 or XMM0-3 if floating point) and IA64 (first 8 arguments passed in the rotating portion of the register file).
[Yes, I know the processor names look a little unfamiliar; specifying 'x86' isn't very helpful any more because 64-bit 'x86-64' code works differently. AMD now wish Opteron/Athlon64-compatible code to be known as AMD64.]
--
Mike Dimmick
|
|
|
|
|
Thanks for the clarification mike.
|
|
|
|
|
Hi. I am in desperate need of help when it comes to MDI child windows. I need to add controls to them, but I don't know how. I've been using CDialogBar as a replacement, but it is VERY limited compared to an MDI child window. A code snippet would be appreciated, but at least telling me which CWnd is supposed to be the parent of the controls would be helpful.
-- Steve
|
|
|
|
|
SteveBob wrote:
but at least telling me which CWnd is supposed to be the parent of the controls would be helpful.
Typically CChildFrame which is derived from CMDIChildWnd. If you have a Doc.View application then you work with CView derived classes, which are children of CMDIChildWnd.
Hope that helps.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Look up CFormView in MSDN. There are many samples in MSDN and here.
Best wishes,
Hans
|
|
|
|
|
Hello, everyone.
I have a library with a class A (has two static functions f1 and f2) and B (calls functions of A), I can compile it, with no problems. Then I am using this library in my program and during the linking I have an error (see below for the log) that static A::f1 can not be found for B.obj.
Maybe someone knows why one function could be found, while the other not? I simplified my problem, because I have a library with a lot of classes and it worked before. I had this problem some time ago but I played with the order of the inclusion of the header files and I got rid of the problem, now I can not help it.
This is the whole message:
Linking...
SJManagers_D.lib(SJGmeMan.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl CSJSndMan::PlaySoundA(unsigned int,bool)" (?PlaySoundA@CSJSndMan@@SAXI_N@Z)
Thanks.
Alexander
|
|
|
|
|
Is your function actually called PlaySoundA() or PlaySound(). The reason I ask is that in one of the standard windows header files, a lot of the standard API methods are #defined to function beginning with A (for ANSI) or W (for Wide). I think that PlaySound is one of them. If this is what is happening, then it is possible that the rename is not taking place inside your library, but does take place when the library is used (i.e. the .lib file has PlaySound() because the rename didn't occur, but the app is looking for PlaySoundA() because a rename has occurred).
You can check this quickly by renaming PlaySound() to something like PlayMySound() and recompiling.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Thanks a lot Dave! It did help.
Alexander http://sjcomp.virtualave.net/
|
|
|
|
|
Has anyone implemented "zoom to extent" feature for a 3D perspective view? I need the algorithm tonight.
Regards,
BB
|
|
|
|
|
Is it possible to make a trojan with code progject??? Im just asking cause im planning to bulid one with VC++ i think I ll be the first one making a trojna with VC++ lol..
|
|
|
|
|
Is it possible to make a trojan with code progject???
I mean is it possible to make a trojan with VC++
|
|
|
|
|
|
yea its very well possible, i made one of my own, its crappy though and uses MFC. The beauty about ur own trojan is that virusscanners don't detect it as one (as long as it doesn't get widespread)
Kuniva
--------------------------------------------
|
|
|
|
|
OH ok, Thats pretty cool that you could make a RAT, I heard is better making RAT in delphi??? but i like MS vC++ better I want to make a nice one is there any tuts on making a trojan on C++?? if there are please post the link
Thankz in advance
th3kill3r
|
|
|
|