|
Hi Guys,
Has anyone run into the issue where two custom programmed activeX controls will not run in the same application? I have ran into this morethan once in my very short activeX experience. Anyone else? ANyone know of a solution? I have tried mulitple configurations, for instance creating the controls in the same project, or in different projects, neither works. I have tried some advanced options, windowless activtion etc, but havn't hit upo the right combination.
Any help? Please? Pretty Please?
Thank all,
Jonathan Brown
|
|
|
|
|
I remember running into a commerical tool a while back that would let you take almost any windows program (the exe) and convert it to a ocx. That ocx control could then be placed in any usual activex container.
For example, you would run this on notepad.exe and get notepad.ocx that you might embed on a web page for example.
Ignoring for the sake of argument why I would want to do this, does anyone know of such a tool?
Thanks,
--Tim
|
|
|
|
|
Dear All,
So far, I have build a COM server,1 DLL. Then I use
#import "..\bin\MyCOMServer.dll"
however, the compiler, Visual C++ 6.0 tell me that:
fatal error C1083: Cannot open type library file: '..\bin\MyCOMServer.dll': No such file or directory
Any comments?
Thank you
David
|
|
|
|
|
Check your path where .tlb file and DLL exists...
Just a thought....
"is ur component registered?"
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I have register it by regsrv32.exe.
However, even I explicity use the path such as follows:
#import "F:\MyProgram\MyServer.dll"
The result is same.
Any further suggestion?
|
|
|
|
|
Have you either (a) explicitly registered the type library
or (b) included it as a resource in your server DLL?
If no to both of these, try #import and specify the .TLB file, not the DLL.
Steve S
|
|
|
|
|
_David_Lee_ wrote:
#import "F:\MyProgram\MyServer.dll"
Just a thought, but shouldn't that be
#import "F:\\MyProgram\\MyServer.dll" ?
I Dream of Absolute Zero
|
|
|
|
|
#import doesn't seem to support paths with dots in. It's usually OK if the file appears in the same directory.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Have to disagree. I have lots of stdafx.h files here in many projects which use
#import "..\bin\component.tlb"
or
#import "..\bin\component.dll"
that work fine
Steve S
|
|
|
|
|
Hi,
I'm working on an intranet site where users can bring up their excel spreadsheet (accounting template) and complete their quarterly numbers. It was easy to create this page by taking the xls file in Windows Explorer and dropping it on a FrontPage web page. Really neat stuff, it looks and acts just like excel but with many limitations. I want the users to enter their info in and then save the spreadsheet - not to their computer (which they can by clicking on the export button which goes to excel) but back to the web server. Does anyone have any suggestions on how to do this with an existing spreadsheet/workbook? Any example code?
Thanks,
Mike
|
|
|
|
|
Hi there,
Can We have same ProgId for two different compoenents?
If yes,
(say "MyApp.MyDll.1" is the ProgId for both Components)
Then what will happen if an application is using "MyApp.MyDll.1"?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
No. Only the component that was registered last would have it.
Edward
|
|
|
|
|
You can, however have a version-independent ProgID. If someone requests that ProgID, it'll use the version specified in the CurVer subkey.
For example, you have 3 versions of a COM object: MyApp.MyObject.1 , MyApp.MyObject.2 , and MyApp.MyObject.3 . You can have a ProgID of MyApp.MyObject , and if you want them to use version 3, set the CurVer 's default value to MyApp.MyObject.3 .
|
|
|
|
|
Thanx.
ian mariano wrote:
"We are all wave equations in the information matrix of the universe"
I liked ur quote
Have a nice day.
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi all
Suppose i create COM object with event what use interface as parameter.
CATLWrappedClass<...>{
Fire_MyEvent(ISomeInterface* pIface)
{
...
}
}
Now from elsewhere i arise this event
...
//This routine query interface from internal object and add
//referience number of one
ISomeInterface* pIface = GetSomeIface();
Fire_MyEvent(pIface);
//My question is - "should client release this interface
//or this my labour?"
pIface->Release();//Do i???
Thanks
|
|
|
|
|
No you shouldn't
The caller controls (allocates and frees) all [in] parameters.
[out] parameters allocated by callee and been freed by caller
Edward
|
|
|
|
|
real_space_monkey wrote:
//This routine query interface from internal object and add referience number of one
ISomeInterface* pIface = GetSomeIface();
Fire_MyEvent(pIface);
//My question is - "should client release this interface or this my labour?"
pIface->Release();//Do i???
YES, you should, because the pIface is in your ownership.
With best wishes,
Vita
|
|
|
|
|
I am trying to create an ActiveX control to be used within MS Access. I want to bind it in a field within an Access form, like you can do with the objects access provides.
Is this possible?
Does anyone have an idea what interfaces should I implement?
Thanks in advance for any hints.
...Plug & Pray...
|
|
|
|
|
I need to catch and handle the WM_DEVICECHANGE message in my COM dll server. I tried to force one of the class inherit from CWindowImp, but it doesn't work. Any idea? Thanks.
Linn
|
|
|
|
|
Hi all
I use in my COM interafse some method which receive BSTR as parameter ie
HRESULT MyObject::SomeFun(BSTR str)
{
SysFreeString(str);//exception is here
}
And i invoke this method from VB client
As far as is known i should free BSTR what had been created by myself directly with SysFreeString(...)
and in my example i free it in this way.But i had unhandled exception at my VB client during SysFreeString(str)
Thats wrong???
Thanks all
|
|
|
|
|
The object that creates the string should be responsible for freeing it again. In your case, whoever calls SomeFun() will create the string (say by SysAllocString) and will also be responsible for calling SysFreeString on the object they created as a parameter, once the call returns:
BSTR bstrNewString = ::SysAllocString(L"Test");
pIMyObjectPtr->SomeFun(bstrNewString);
::SysFreeString(bstrNewString);
|
|
|
|
|
|
The rules are:
[in] data initialized before passed to method, and is expected to be initialized when the method returns. COM-objects living in the same apartment can modify parameters (i.e. strings) eventhough they're labeled as [in] . It may or may not work - it sure won't work across apartment boundaries.
[out] has no reference to any valid data. If it does, that's just a coincidence - don't rely on it. You, the method callee, are responsible for allocating data to return through this parameter (or nothing/NULL if you're dealing with reference semantics).
[in, out] If you are to update the value of such a parameter, you must first free the passed in value, and allocate a new one for the return. Note that if [in, out] long* param is passed, you don't have to allocate memory, just *param = value; . If you get a [in, out] IInterface** p , then (*p)->Release(); *p = ... .
[edit][out, retval] has the exact semantics as a [out]. Clients such as VB uses the retval attribute only to synthesize a return type for methods.[/edit]
--
Din mamma.
|
|
|
|
|
THAKS ALL
|
|
|
|
|