|
|
Hi,
I'm having a problem creating a CDialog in a dll. The dll adds a menu entry to explorer context menus and executes some action when user clicks on menu entry. It should display a dialog (derived from CDialog). The dll had enable-MFC checkbox checked in the new-project wizard. But there's a problem with the resource handles. When the dialog is created it gives an assert in this code in AFXWIN1.INL:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
----> { ASSERT(afxCurrentResourceHandle != NULL);
return afxCurrentResourceHandle; }
|
|
|
|
|
put the following code before you create the dialog.
AFX_MANAGE_STATE( AfxGetStaticModuleState());
|
|
|
|
|
Many thanks, it worked!
|
|
|
|
|
Please refer here[^] for more information.
Regards,
Paresh.
|
|
|
|
|
I have created and project in MS visual studio 6.0 as below
#include "stdafx.h"
#include <iostream.h>
class Rational
{
double r;
public:
Rational(int numerator, int denominator)
{
r = numerator/denominator;
}
operator double()const
{
cout<<r<<endl;
}
};
int main(int argc, char* argv[])
{
Rational r(1,2);
cout<<r;
cout<<endl;
return 0;
}
It works fine.
But when I build the same in MS visual studio 2005, the following error comes
1>c:\problemimplicittypeconversion\implicittypeconversion.cpp(5) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
How to rectify this problem
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Change to
#include <iostream>
using namespace std; // and add this line if you don't want to write std::cout everytime
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
|
Is vc 2005 express edition?
--
"Programming is an art that fights back!"
|
|
|
|
|
vibindia wrote: How to rectify this problem
Have you checked if the file exists or not?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi friends
I am an application programmer, now i want learn threading concept in VC++ ..please guide me ..how to study and please give some sample application ...and also how to communicate client to server ...please give one sample ....
thanks n advance
Nisha
|
|
|
|
|
The search functionality on CP is still active and you can search on google too. Just put Threading as the keyword in the search field
If you need to write some sample for your understanding, you can simply create two threads and do some task like moving an image, counting numbers and printing them on screen etc etc...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
|
Codeproject has lot of good articles about it.
|
|
|
|
|
atlsmtpconnection.h is available in VS 2005 but not in VS 2008. Also I am not able to find other classes like CMimeMessage etc in VS 2008. Does anyone have any idea whether I need to install anything else to get these classes?
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
Hello everyone,
If there is an arbitrary address (e.g. 0x12345678), how to check whether it is code or data or stack? Any command to display the information (suppose I have symbol file) in the arbitrary address? Could we use WinDbg tool?
thanks in advance,
George
|
|
|
|
|
Will the PEDUMP tool do the job for you?
« Superman »
|
|
|
|
|
Hi Santosh,
In my understanding, PEDUMP tool dumps human readable information in a static way -- without running the binary. But my purpose is to dump information at runtime at some specific address. Without running, just do static analysis, you do you know what information (code/data/stack) will reside in some specific memory address, right?
Please feel free to correct me if I am wrong.
regards,
George
|
|
|
|
|
There is no specific address where each section resides.
You will need to understand the PE format.
It is a chain of data structures.
You will need to examine the PE Header and the PE optional header of the executable to get the starting relative virtual address of each section.
« Superman »
|
|
|
|
|
Thanks Santosh,
Sorry I do not agree with you. Suppose my application loads a DLL and I want to debug into the DLL, since DLL could be loaded into any address (possible reload), how could you just get the actual address using static analysis tool without running it?
Please feel free to correct me if I am wrong.
regards,
George
|
|
|
|
|
OK. Now I'm not sure if I understand your requirement.
« Superman »
|
|
|
|
|
I have a question for you, Santosh.
A DLL could be loaded at any arbitrary address, how could you use PEDUMP to analysis information at some address without actually run/load it. Let me know if I have not made myself understood.
regards,
George
|
|
|
|
|
Well if you read about PE is very helpful for you and if you like to see it I saw a very good article on the www.codeguru.com about it.
|
|
|
|