|
Hi,
yes I have registered the control and added header file and .cpp file of that control using Add-> class->MFC from ActiveX into my project. I created a member variable of that class by the following code on button click of my application
CQualityCheck chkdlg;
chkdlg.callSample("");
but while running it is showing error in the following code winocc.cpp file:
void AFX_CDECL CWnd::InvokeHelper(DISPID dwDispID, WORD wFlags, VARTYPE vtRet,
void* pvRet, const BYTE* pbParamInfo, ...)
{
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
return;
va_list argList;
va_start(argList, pbParamInfo);
m_pCtrlSite->InvokeHelperV(dwDispID, wFlags, vtRet, pvRet, pbParamInfo,
argList);
va_end(argList);
}
Please help how to resolve this?
Adity
|
|
|
|
|
The list that you see is not Windows ActiveX Controls.
They are all the registered ActiveX controls.
Like Chandrasekharan said, you need to register the ActiveX control using regsvr32.exe
However, you do not need to place it in the system32 folder.
You can place it in any folder.
|
|
|
|
|
«_Superman_» wrote: However, you do not need to place it in the system32 folder.
You can place it in any folder
Thanks for this information. I normally put in in System32 folder and register it.
Every new day is another chance to change your life.
|
|
|
|
|
Hi,
yes I have registered the control and added header file and .cpp file of that control using Add-> class->MFC from ActiveX into my project. I created a member variable of that class by the following code on button click of my application
CQualityCheck chkdlg;
chkdlg.callSample("");
but while running it is showing error in the following code winocc.cpp file:
void AFX_CDECL CWnd::InvokeHelper(DISPID dwDispID, WORD wFlags, VARTYPE vtRet,
void* pvRet, const BYTE* pbParamInfo, ...)
{
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
return;
va_list argList;
va_start(argList, pbParamInfo);
m_pCtrlSite->InvokeHelperV(dwDispID, wFlags, vtRet, pvRet, pbParamInfo,
argList);
va_end(argList);
}
Please help how to resolve this?
Adity
|
|
|
|
|
Hi, Im having one VB executable file named as VSCModule.exe
I want to use this in MFC to use the functions in that executable.
Previously ,it has used in VB Macros.
Just they add referennces , Tool->References and select VSCModule.exe.
VBA coding :
Dim vsc As New VSCmodule.vsc
vsc.getVar("PL", "PVC101", "PV").Value 'getVar is function belongs to VSCModule
Just i want to know.Can i use this exe in MFC? If it is so How can i use that?
Im using VS2008 version.
I add reference in VC++ in the same way, its get added in References Column as
Interop.VSCModule.1.1
I dont know how to proceed after this?
Pls kindly help me.
Anu
|
|
|
|
|
You can execute any EXE from MFC using the CreateProcess API.
|
|
|
|
|
Anu_Bala wrote: Can i use this exe in MFC
If I understand you correctly, you want to know if you can call functions inside the VB exe from your MFC program.
No you cannot do that. If those fucntions were in a DLL you could but not an exe. You can run the exe and get a result from the VB exe if that will suit your purpose.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Hi,
I have two questions
First
I have CRichEditCtrl inside a CDialog My first question is can a CRichEditCtrl or for that matter any control accept messages or do all control that are part of Dialog have to have thier messages first go to the CDialog and then have The CDialog process the control('s) messages that live within it
Second if a control can process it own messages is all that is need is have
a DECLARE_MESSAGE_MAP() in the control class defination
and then a BEGIN_MESSAGE_MAP to process the messages for the control
Thanks in advance
|
|
|
|
|
|
Not completely sure i understand what you are trying to say, but take a look at Message Reflection[^], this might be what you need.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hi, I want to start to develop windows drivers which are not device drivers I got a task and I need to make a hidden or non killable system watcher for my business this driver will only control my another process is alive if it is not alive it will give the system a shut down or driver will hide my application or when the user tries to kill my application driver will give Access is denied (For all users including Administrators) message and I know C, C++, C# at intermediate level I decided to begin developing in C++. Which IDE should I use?, Where should I start from? I have to do this I am not a virus developer or something like that Thanks.
|
|
|
|
|
Is your keyboard missing its punctuation keys?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I didn't even read it because of how it looks (run-on and no paragraphs).
|
|
|
|
|
This is EXACTLY what I need, thank you for your answer...
|
|
|
|
|
Use Visual Studio and go for a Windows Service application.
|
|
|
|
|
You need to use C. DOnt use C++, it isnt supported in the kernel.
You need to write a File System mini filter and fail the IRP_MJ_CLOSE when it is for your application. Doing this is devilishly complex, and you would be best to hand this over to an experienced company to do with you working closely with them. That way you learn and your product gets developed. If you try this as a novice, you are almost destined to fail, some years down the road.
If you think ordinary device drivers are hard to write, then at least there are plenty of books for them. File System drivers are virtually undocumented.
Oh, and there isnt an IDE. You have to use the 'build' macro from the DDK (WD as it is called today). SO you can use any text editor you like. I use VS, but thats just by habit.
==============================
Nothing to say.
|
|
|
|
|
I appreciate your answer. Thank you for your attention.
|
|
|
|
|
Uhm, C++ isn't supported in the kernel?
I think you mean that MFC isn't support in the kernel.
The Kernel doesn't know anything about the original source the binaries are created from.
|
|
|
|
|
No, I mean C++ isnt supported, as in supported by Microsoft if you have a problem and go to them. Of course you can run C++ derived code, you just need to be carefull about what features you use.
==============================
Nothing to say.
|
|
|
|
|
candogu wrote: I need to make a hidden or non killable system watcher
candogu wrote: will give Access is denied (For all users including Administrators)
Thus preventing any user or adminstrator from being able to control their own system.
candogu wrote: I am not a virus developer or something like that
I can see no other reason that you would want to do this.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Or, in other terms: Warning: you're going to create a virus or something like that by accident!"
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
U can see what u want. Yes I am lying what is gonna happen??? I am the biggest virus developer in whole world? Are u happy now?
|
|
|
|
|
It is only going to block one application from being stopped.
Of course he can have a user created whose SID is allowed to close that exe so control can be maintained.
In fact I have done this kind of thing with security SW. Certain apps and areas of the registry have access blocked, launching of aplicaitons is limited to certain users or groups, typical security stuff.
==============================
Nothing to say.
|
|
|
|
|
Yes, but I have a sneaking suspicion that you actually understand the mechanics and implications of doing something like this.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|