|
Hi all
I've created an ActiveX control, and an Application derived form CFormView.
in the FormView of Apllication, i insert this ActiveX control.
In ActiveX control, how can i get the window of the application that use the it
Thanks
|
|
|
|
|
Is there some way on which I could register a dll or ocx not using Regsvr32.exe?
I want to register dlls programatically, knowing only the path and dll name.
I also want to know if it has been registered or not.
Is there an API that does this?
Please help. Thanks.
SDE
|
|
|
|
|
Load dynamically the DLL and call the function DllRegisterServer, for registration a server
|
|
|
|
|
|
Hi!
With CreateFromFile() I am able to open an excel file in my ole
container application.
I want to embed excel sheet in my container applicatio and want to
display contents of a file, but i dont want to use CreateFromFile(), I
just want to pass raw data as input.
Which function shall I use,CreateFromClipboard() or CreateFromData().
I am running on Win2k and have office2k.
Thanks
Anshu
|
|
|
|
|
I have a .Net application that i want to access from a VC++ client as a COM object. Everything goes fine until i want to pass parameters. The description of the function is:
in VB.Net
Public Function SelectDoc(ByRef tstrDocID As String, ByRef tintFlags As Integer, ByVal tintWindow As IntPtr) As Integer
the idl description is:
long SelectDoc(
[in, out] BSTR* tstrDocID,
[in, out] long* tintFlags,
[in] long tintWindow);
i call it with invoke
hr = pDispatch->Invoke(DispatchID, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &DispatchParams, (VARIANT*)&lngReturn, NULL, NULL);
with the following params:
DISPPARAMS DispatchParams;
DispatchParams.cArgs=3;
DispatchParams.rgvarg = new VARIANTARG[3];
DispatchParams.rgvarg[0].vt = VT_BYREF|VT_BSTR;
DispatchParams.rgvarg[0].pbstrVal = &bstrDocId;
DispatchParams.rgvarg[1].vt = VT_BYREF|VT_I4;
DispatchParams.rgvarg[1].plVal = &lngFlags;
DispatchParams.rgvarg[2].vt = VT_I4;
DispatchParams.rgvarg[2].lVal = 0;
DispatchParams.rgdispidNamedArgs=NULL;
DispatchParams.cNamedArgs=0;
The invoke return 0x80040002 witch means No such interface supported
I've tried to change the attribute of the class witch implements the method
(AutoDual, AutoDispatch, None) and it didn't work. I've made an interface for the class because i've read somewhere that i should do this.
Can anyone please help me?
dzsigit
|
|
|
|
|
Can be LOCALE_USER_DEFAULT instead of LOCALE_SYSTEM_DEFAULT.
Might be useful to post your entire idl file, so at least the interface shows.
The attribute added to the VB.NET code matters. If it this doesn't tell the compiler to mark the interface as automation enabled, then yes you are pretty much sure that Invoke will fail.
You might be interested in this article : http://www.codeproject.com/dotnet/nettocom.asp
RSS feed
|
|
|
|
|
Thanks for that article it seemed to solve my problem, but it still doesn't work.
The error is still "No such interface supported".
|
|
|
|
|
There can be two reasons at least :
- bad attribute usage in the VB.NET code : hard to help without knowing anything about your code and your resulting idl.
- type-library not in the gac : make sure to read the comments (regasm, ...) in the article previously mentioned. In some cases, there are things that must be done manually.
RSS feed
|
|
|
|
|
I've found the problem
I had to use CComBSTR not BSTR type, and it works.
Thanks again
|
|
|
|
|
Hi all
I'm deveploping an Application, and i need a Component that can convert image( may be .gif, or png..) to flash.
help me
thanks
|
|
|
|
|
Hi all,,,
I make an application that will connect to a remote database on a Win98 machine..
I want to use the 3-tier architecture and call Middle tier components on the Win98 machine
can this be done using DCOM or any other method ?
any links - suggestions are appreciated
|
|
|
|
|
How to make COM+ event class and subscriber in Visual C++ .NET
|
|
|
|
|
Hi Gurus!
I've written COM-server (executable, out-of-process) and COM-client. Both works successfully through DCOM on separate PCs. Is it possible to obtain information about calling client in COM-server (I want to know computer’s name and its IP address, username who launch the COM-client) ? How?
Yours sincerely,
Alex Bash
|
|
|
|
|
Check out CoQueryClientBlanket and IServerSecurity interface. That should give you some info about the client if impersonation level is higher than RPC_C_IMP_LEVEL_IDENTIFY
Edward
|
|
|
|
|
Anyone know how to automate internet explorer ? And I need to be able to fill in forms click buttons run javascript etc... more than just navigate to a page?
|
|
|
|
|
How can i cast varEnum to CString e.g VARENUM vt=VT_I2;
Now i want to show that VT_I2 through string. How can i do that.
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
can you give me some code samples or advice?
|
|
|
|
|
Can anybody tell me..How to insert table in richtextbox control as in MS word..I'll be helpful to u...PLease help me sir..
I'll be very thankful to u.
OK! Good Bye...Have a Nice Life..Bye. Sumit Kapoor
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
Hi all,
I try to design my own script debugger in the basis of ms windows script
debug interfaces. But i met some problems.
i read one article from MSDN online -- Active Scripting APIs: Add Powerful
Custom Debugging to Your Script-Hosting App.
First, the author said one rule is imperative to reach, that is to execute
your script code one time, then you can set the breakpoints correctly. i
debugged the sample attached and that's right. otherwise, the
IDebugCodeContext pointer is empty and the breakpoint can't be set enabled.
this seems so strange if there are some UI elements or operations in your
code.
Second, How can i debug one script segment of global code? I changed that sample a little so that global code can directly run not by invoking some named function. I found any breakpoint set in some of global code was invalid.
Thanks a lot
alan
|
|
|
|
|
Hi everybody,
I’m developing an MFC application. I‘ve created an event sink for IHTMLFormElement, using BEGIN_DISPATCH_MAP-END_DISPATCH_MAP macros.
In this event sink, I’m catching submit event of the form. For most of the sites it’s working fine. But for some of the SSL sites like bankofamerica.com, the form sink does not get submit event. How to get submit event for such sites?
I tried put_onsubmit, but it is also not working. I might be making some mistake doing it. The code I tried is:
hr = m_pUnkSinkForm->QueryInterface (IID_IDispatch, (void **)&pSelfDisp);
VariantInit(&vargID);
vargID.vt = VT_DISPATCH;
vargID.pdispVal = pSelfDisp;
IHTMLFormElement *pIHTMLFormElement = NULL;
hr = m_pUnkSrcForm->QueryInterface(IID_IHTMLFormElement, (void**)&pIHTMLFormElement);
if(SUCCEEDED(hr))
{
hr = pIHTMLFormElement->put_onsubmit(vargID);
If there is any other workaround except put_onsubmit, please mention, I’ll try it out.
Thanks in advance…
Avya.
|
|
|
|
|
Hi All
I have a MFC client wich is a part of big 3-tier application. Recently, I've begun to convert some parts of it into managed code.
By that, I mean that I rewrote some components of the app using C# and imported them into my app as a COM components (including the communication with the server wich I changed from COM+ to .Net remoring).
It works fine, but when I close the application I get exception in call to corExitProcess().
Does anybody know something about that?
Do I have to shut the CLR in some way?
thanks!
|
|
|
|
|
Is it possible to write my own outlook, but only interface (UI) wise? In other words, does Outlook provide access to it's internals (database, code to send recieve email, account information, etc.)?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
There's an object model, so yes, at least partially. However, it may be that some operations bring up bits of Outlook's own GUI.
Steve S
|
|
|
|
|
I am able to get document for the window, but how can I get interface pointers multiple documents.
A window can contain multiple documents. To be precise, if a document has multiple frames each frame has its own document. How can I access the document associated with particular frame.
Avya.
|
|
|
|