|
Hi !
I already Implemented the hooks.
I am asking doubt about hooking on visual basic control.
I am not able to monitor button related message or edit control related messages like EN_ or BN_
using the windows hooks i got only core controls created using win32 or mfc etc......what about visual basic.
How should i monitor the visual basic control notifications or control messages ?
Please clearly read my question
WM_QUIT
Lakshmi NArasimman
|
|
|
|
|
Does anyone help me plot a single pixel in 320x200 screen @ 256 Color?
"You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
|
|
|
|
|
|
Thanks a lot bro... i'm digging in it.
"You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
|
|
|
|
|
hie Guys,
I have a class like
class ABC
{
public:
static const int var=10;
};
Here initialing the var with 10 is allowed inside class.
In early compilers(I have VC 6.0) it does not work but it works with VC7.0.
Rule says that only static integral constants are allowed to be initialized inside class.
May I know why this requirement came when we already have following facility as shown belows
class ABC
{
public:
static const int var;
};
const int ABC:: var =10;
Also My question is where is the compiler putting this code - static const int var=10 when it is inside a class?
It can not be in constructor or in memberwise Initialization list.So what is workaround? Why this is special case?
Vikram S
|
|
|
|
|
vikrams wrote: Also My question is where is the compiler putting this code
all the static initializations are done at the beginning of the application, whatever it is a class member or not.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
True. What about "static const" inside class?
|
|
|
|
|
vikrams wrote: What about "static const" inside class?
static const is static BTW, right ?
then same rule.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
static const members can be initialized inside class inline definition.
for example the below compiles:
class A
{
public:
static const int v = 3;
};
int main()
{
A a;
a.v;
return 0;
}
Maxwell Chen
|
|
|
|
|
then... isn't it what i was saying ?
even if you write the initialization there, the code is executed at the beginning of the program (because static members are initialized like that).
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Unless the static is within a method, in which case it is initialized the first time the method is called (potentially causing some thorny multi-threaded issues).
|
|
|
|
|
Hey Guys,
What code u have provided is correct. I also mentioned same code in my question. I have 2 concerns
1) const static members can be directly init in class
so what is wrong with normal static members?
2) As normal const vars has to be init at the time of declaration in code(somewhat like references ). In my class I need to init my const var in memberwise init list.
so we have an issue where we have const needs whose init code needs to be inside class and static needs to be outside.
so the soln in compiler is put static const var outside let it be define there.
Here my question is why we can also put it inside class? what is req. forced to provide such facility? what is rational behind that?
-- modified at 6:46 Tuesday 18th July, 2006
|
|
|
|
|
Hi to all,
How to Unregister a registered dll file, with or without coding ?
As we can Register a dll using 'regsvr32.exe', is there any option to unregister the register dll?
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
To unregister regsvr32 /u C:\YourFile.OCX
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
Start->Execute
type regsvr32 and then Enter.....
you can visualize a dialog options.
regsvr32 "file path" /u
Too many plans make the health badly!!
-- modified at 2:52 Tuesday 18th July, 2006
|
|
|
|
|
|
Ex for regster given , to un reg, get function pointer of "DLLUnReg...Svr"
HCRET lpfnDllRegisterServer = NULL;
DLLName = "YouDLLName.dll";
hDLL = LoadLibrary(DLLName);
if (hDLL != NULL)
{
lpfnDllRegisterServer = (HCRET)GetProcAddress(hDLL, "DllRegisterServer");
if(NULL == lpfnDllRegisterServer)
{
//ERR
}
else
{
if(FAILED((*lpfnDllRegisterServer)()))
{
ERR ("Tripio registration failed!");
}
else
{
//"Registering DLL Success"
}
}
FreeLibrary ( hDLL );
}
else
{
ERR("LoadLibrary failed");
}
|
|
|
|
|
Hi,
I tried ur code in VC6. But it is giving me Errors like,
: 'HCRET' : undeclared identifier
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Friend
HRECT is just a function pointer type def as
typedef HRESULT (CALLBACK *HCRET)(void);
Let me know worked or not to anilkumarkv@gmail.com
|
|
|
|
|
Aniket Salunkhe wrote: As we can Register a dll using 'regsvr32.exe', is there any option to unregister the register dll?
you can dynamically load dll and call teh dllunregister routine
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I dont understand where this routine should be called.
If possible give me an example.
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Aniket Salunkhe wrote:
Hi,
I dont understand where this routine should be called.
If possible give me an example.
Let fatCom.dll is your DLL ....
then using LoadLibrary function load that dll in your Process memory space and using GetProcAddess Function get DllUnregister pointer and call that function!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: then using LoadLibrary function load that dll in your Process memory space and using GetProcAddess Function get DllUnregister pointer and call that function!
I use code as follow,
HCRET lpfnDllRegisterServer = NULL;
HINSTANCE hDLL = LoadLibrary("SimpleExt.dll");
if (hDLL != NULL)
{
lpfnDllRegisterServer = (HCRET)GetProcAddress(hDLL, "DllUnregister ");
if(NULL == lpfnDllRegisterServer)
MessageBox("ERR");
else
{
if(FAILED((*lpfnDllRegisterServer)()))
MessageBox("Dll registration failed!");
else
MessageBox("Registering DLL Success");
}
FreeLibrary ( hDLL );
}
else
MessageBox("LoadLibrary failed");
But it is showing MessageBox("ERR"). (in BOLD)
What is the problem?
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Aniket Salunkhe wrote: HCRET lpfnDllRegisterServer = NULL;
lpfnDllRegisterServer should of type :- HRESULT STDAPICALLTYPE DllUnregisterServer(void)
and
Aniket Salunkhe wrote:
lpfnDllRegisterServer = (HCRET)GetProcAddress(hDLL, "DllUnregister ");
pass DllUnregisterServer instead of DllUnregister
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|