|
How to Make win32dll which has two function?
|
|
|
|
|
Is there any sample algorithm(Mathematical Equations)links for taking a serial number and generating a unique number used for software protection.
Thanks
|
|
|
|
|
I recommend you go search http://sourceforge.net/
Trust in the code Luke. Yea right!
|
|
|
|
|
I recommend you search http://sourceforge.net
Trust in the code Luke. Yea right!
|
|
|
|
|
I am looking for source code for small(~15-20KB)highly customizable application, that capture keystrokes and save it into encrypted log file,
Centrum
|
|
|
|
|
yeah.. i wrote one for my personal use.. i think i can publish that here..
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
If i try to compile my mfc dialog application in DEBUG configuration with a '#include <vector> inside one of my cpp files or headers, i get the following error messages:
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(36) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl op
erator new(void))(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\memory(16) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2784: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' : could not deduce template argument for 'void *(__cdecl *)(u
nsigned int,class std::allocator<_Ty> &)' from 'void *(__cdecl *)(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2785: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' and 'void *(__cdecl *__cdecl operator new(void))(unsigned int
)' have different return types
c:\program files\microsoft visual studio\vc98\include\memory(16) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\memory(20) : error C2954: template definitions cannot nest
Error executing cl.exe.
Creating browse info file...
I can't figure out why this happens or how to fix it.
BTW it compiles without the #include <vector> in DEBUG configuration. And it also compiles with/without it in RELEASE configuration.
I'm using VC++ 6
Hoping you can help
ScorpioMidget
|
|
|
|
|
Put your include<vector> AFTER #include <stdafx.h>
[edit] I meant BEFORE. Does this happen to you sometimes ? I was thinking "BEFORE, not AFTER" and finally wrote AFTER [/edit]
~RaGE();
|
|
|
|
|
At last i got it 2 compile by putting #include <vector> above all mfc includes.
Is the right way to go when mixing STL with MFC ?
ScorpioMidget
|
|
|
|
|
Move the vector header include above the debugging macro 'hack' that VC6 uses
#include <vector>
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
|
|
|
|
|
Hello, is there any way that I know at run-time at what platform my application is running? A few things have to change in order for my application to run in both unix and windows. I think that I can do sth with #ifdef or sth like this. Can you help me out by giving some examples?
Thanks, Themis
|
|
|
|
|
#ifdef is a precompiler command. If you put your code like :
#ifdef WINDOWS
bla ...
#elsif UNIX
stuff...
#endif
then putting a #define WINDOWS at top of the file will compile only the code between WINDOWS "scope" (i.e. bla...), and #define UNIX will compile the "stuff...". But this is only at compilation time and you need something at run-time. On solution would be to compile two separate app, one for Unix, one for Windows. Second solution would be to ask the user about the OS when installing your app, store the result in the registry, and read the key at application start.
~RaGE();
|
|
|
|
|
The same executable file won't run under both Windows and Unix, so there must always be two separately compiled applications.
|
|
|
|
|
Hm, did I say run-time??? Well I wanted to say compile time, thank you for your help.
Themis
|
|
|
|
|
Most compilers have predefined macros specifying the OS used for compilation like __WIN32__ or __unix__
|
|
|
|
|
The ones I know of, predefined by the compiler (so you don't have to):
__unix<br />
_WIN32
Regards,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
Seems I'm full of questions today.
Is there and easy way to send data to and Excel worksheet
from an MFC application?
For example, if I have an open excel worksheet, can I send data
from a separate application to that worksheet with a small amount of
code/effort?
We're looking to automate a painful manual import of data into Excel.
Thanks.
|
|
|
|
|
|
John Theal wrote:
Is there and easy way to send data to and Excel worksheet
from an MFC application?
For example, if I have an open excel worksheet, can I send data
from a separate application to that worksheet with a small amount of
code/effort?
It depends of what you want to do. Just make a search on MSDN[^] with "HOWTO automation Excel", or have a look at Article ID: Q178749 and Article ID: Q178781 (in MSDN) and you will have a good start.
~RaGE();
|
|
|
|
|
We need to capture view, when a dialog box is being displayed. we are not getting the information of the view which is below the dialog box.
could anybody please help to solve this problem.
thanx.
|
|
|
|
|
What is not working ? What did you try ? How is your code ? What is returned by GetActiveView() ?
~RaGE();
|
|
|
|
|
I'm coding an MFC MDI doc/view simple sound editor called Asaph.
There are 2 menu resources: the IDR_MAINFRAME one for when there are no open docs, and the IDR_ASAPHTYPE one used when a doc is open.
I want to be able to dynamically add menu items (using CMenu::InsertMenu()) for things like plugins, to the IDR_ASAPHTYPE menu.
Even tho the applicatiopn starts with a new blank doc, when CMainFrame::OnCreate() is called, GetMenu() still returns the CMenu created from IDR_MAINFRAME.
When is the doc menu loaded and how I can I access it to add the items ?
My only idea so far is to do it from the the document class in the first call to OnNewDocument() or OnOpenDocument() but that seems like a bit of a hack fix.
Cheers, Rowan
|
|
|
|
|
In order to write registry keys etc., I want t use the details entered in the version part of a resource (such as CompanyName).
The question is, how do I read this ?
Thanks.
Elaine
The tigress is here
|
|
|
|
|
Here you go
bool GetDllVersion ( LPTSTR szDllFilename, std::string& sProductVersion )
{
DWORD dwHandle, dwInfoSize;
BYTE* pBuffer;
void* pvVersion;
UINT uBufLen;
dwInfoSize = GetFileVersionInfoSize ( szDllFilename, &dwHandle );
if ( 0 == dwInfoSize )
return false;
pBuffer = new BYTE [dwInfoSize];
if ( NULL == pBuffer )
return false;
__try
{
if ( 0 == GetFileVersionInfo ( szDllFilename, dwHandle, dwInfoSize, pBuffer
return false;
if ( 0 == VerQueryValue ( pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"),
&pvVersion, &uBufLen ))
return false;
sProductVersion = (LPCTSTR) pvVersion;
}
__finally
{
delete [] pBuffer;
}
return true;
}
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Thanks Mike, but that is to get the version number of an external DLL.
I was trying to avoid redundant information in my project by reading the CompanyName string from the resource and using that to build the registry key entry. This would include ProductName.
Elaine
The tigress is here
|
|
|
|