|
Well, the .exe will be unable to do the right thing with new functions in .dlls anyway.
I'd split current exe into small .exe program listening for updates and main .dll which contains the core functionality. If new functions appear, .exe unloads the main .dll and replaces it with the updated one which knows what to do with updated plugins.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Thank you for the suggestion.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
or use plugin style dlls. have the exe scan a particular dir, and attempt to load each dll present, in turn. each dll should have an identical entry point.
Signature space for rent. Apply by email to....
|
|
|
|
|
Yes, but I've got an impression that 'identical entry point' doesn't apply in his project.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
I want to display a graph on my property page.
There appears to be many methods for doing this in MFC. e.g. ActiveX, COM, OLE, using existing libraries C++. I'm looking for the least time consuming method.
The simple MS Excel graphing techniques are sufficient for my needs. The data will produce simple non-linear relationships from data stored in CMyProjDoc.
Any ideas?
Kash
|
|
|
|
|
Least time consuming method is ripping method. Get it here[^].
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
I've been doing some research and found I can place an ActiveX control on my property page. This control takes the form of MsChart. How can I link the data to this chart?
Kash
|
|
|
|
|
When I write the following, perfectly ordinary code:
pItem = new CItem;
I get this message:
error C2660: 'new' : function does not take 3 parameters
???
When I write the same code in another cpp file (for the same CItem) it work's fine. What's going on here?
Regards, Haakon.
|
|
|
|
|
Are you overriding operator new in the file which causes problem?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
May be it is #include <crtdbg.h> or #define DEBUG_NEW or #define _CRTDBG_MAP_ALLOC or something else similar to it. Do you have anything like that? Compare #includes and macros in both files.
|
|
|
|
|
Yes, that's it! Operator new is overridden, and that doesn't go well with DEBUG_NEW. In the file where new works I had the #define new DEBUG_NEW commented out. I remember now. Sorry
I don't understand why, though. But never mind. Problem solved.
Thanks for your help.
|
|
|
|
|
Operator new with 3 params is used only in debug version. 2'nd param is module name, the third - line number. It gives possibility to you to find out memory leaks without any hardships
|
|
|
|
|
Hi
Quick question:
Can one OR (||) compiler directives, such as:
IFDEF ( xxxx || yyyy )
ENDIF
Thanks
Rui
|
|
|
|
|
Use '#if' and 'defined':
#if defined(XXX) || defined (YYY)
...
#endif
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Hey,
I have written an executable to capture mouse/keyboard events and play these back after. The function basically writes the message data to a text file, and reads it back in for playback.
I now need to put this into a COM DLL so that I can call it from a VBScript to get a playback.
The problem i have is with the ::SetWindowsHookEx function. I call it as follows
g_hHoohPlayBack = SetWindowsHookEx(WH_JOURNALPLAYBACK, JournalPlaybackFunc, LoadLibrary((LPCTSTR) "TRShell"), 0);
and in the callback JournalPlaybackFunc function, i use this to recreate the mouse/keyboard event
PostMessage(HWND_BROADCAST, WM_SERVICE_INFO, SI_S_PB_WAIT, lReturnValue);
It seems to be going into the callback function ok, but there is a problem with the Postmessage parameters. This code worked fine for the executable, but not when i use it in a dll and call from VB. Nothing happens.
Thanks for any help
tony
|
|
|
|
|
hello,
I have made a program in C++ , now i want to add the functions and structures to my an VC++ 6.0 MFC application . i have made a header file (-->"wioctl.h") and added all the functionality and structures in it.
Now when i include this file in more than one file including Application.cpp , it gives a linking error for all the functions and structurs -->> function <myfunction> already defined in Application.obj
|
|
|
|
|
You shouldn't add function definitions in .h, only functions declarations (prototypes) and structure types. Split wioctl.h into wioctl.h and wioctl.cpp.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Tomasz Sowinski wrote:
You shouldn't add function definitions in .h, only functions declarations (prototypes) and structure types.
...Or you must use inline functions
|
|
|
|
|
... or static functions or ones defined in anonymous namespace.
The question is, should the still be in .h file? Without actual functions, nobody is able to answer this
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Perhaps use this in your header file:
#if !defined(MYHEADERFILE_H)
#define MYHEADERFILE_H
#endif
Because this header is used by other files, it could be redefine...
Hello World!!!
from Raphaël
|
|
|
|
|
hi,
I have an SDI application. I have a splitter with left and rigth view . I have added a list in left view.
Now i want that whenever any of the nodes in left view is clicked, the view in the right change and show some data, if other is clicked some other data is shown And every right view should retain its data .
how can i do it ??
thnx,
|
|
|
|
|
Handle LVN_ITEMCHANGED in left view and change the right view accordingly. What kind of window is the right view?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
You might notify your CDocument about view changing and then inform all views by means of UpdateAllViews (see MSDN). Create some flags in CYourDocument, which describe document state at that moment, when you update views. Each view will look at this flags and will decide whether must it make update of itself or not. Or you can manage updating of views from CYourDocument class and decide here which view needs update.
Also you may find specified view by means of GetFirstViewPosition/GetNextView but I do not recommend to link views directly. It is better to use technique described above.
|
|
|
|
|
friends,
i wrote an application to download the files from an FTP server by using the CFtpConnection,CInternetSession and CFtpFileFind...
my application will check the ftp server in a time interval,and if there is any files then simply download them..i used this program to collect files in which other users upload to that ftp server
i used the GetFile() method to download the file...but my problem is that...if there is any files they are not completley Transfered(transfering in progress),they are also downloads.ie i get some incomplete /damaged files
Is there is any way to identify the Files in which they are in the Status of Transfering(copying to server),ie not completely uploaded to the server....
hav any idea..??
A Programmer Never Dies..***
|
|
|
|
|
In the release build, _DEBUG isn't defined. #ifndef _DEBUG evaluates to true at compile time and code is included.
ns wrote:
Or is there something like _RUN or something that makes code run at runtime thats within #ifdef _RUN execute?
I don't know what do you mean by this.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|