Skip to content

COM

COM discussions

This category can be followed from the open social web via the handle com-ba4ced8e@forum.codeproject.com

4.8k Topics 11.7k Posts
  • How to open error.log file

    question help tutorial
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Object to save text or number into file

    question com
    3
    0 Votes
    3 Posts
    10 Views
    B
    i'l need to make an com object to handle errors in my softwear like if i get error then i like to do on error goto saveError and in my com Object i like to say if errornumber <1000 then save errornumber or text or text and number else resume next
  • Reading an existing Excel File from C++/COM..

    tutorial c++ com testing tools
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • What's Component Manager

    com question
    2
    0 Votes
    2 Posts
    8 Views
    S
    I beleive its Components Services in Win2000 in 98 or NT4 its where you make your packages ,you should definitly get the Platform SDK CD or download it from microsoft it'll give ya your answer,cause quite frankly I am not sure that I understand your question we'll at least I tried Steeves ,C++ programmer
  • Calling a COM component from ASP

    question c++ com tools performance
    2
    0 Votes
    2 Posts
    8 Views
    A
    Hi, First of all you should use the SysReAllocString instead of SysAllocString. It's not the source of the problem but it's a correct way of doing things. Before assigning a new value to the pointer you must free the data it's pointing to. STDMETHODIMP CTest::get_Path(BSTR *pVal) { if(pVal == NULL) return E_POINTER; if(!SysReAllocString(pVal, m_bstrPath)) return E_OUTOFMEMORY; return S_OK; } Your problem is that in VBScript and JScript cannot pass parameters by reference to automation properties or methods. Use return values of properties and methods to return a value instead of using byref parameters for this purpose. This approach limits you to one return value. Regards, Alex Gorev, Dundas Software.
  • Name Space Extension

    question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • void* in a parameter in COM function

    question com help
    3
    0 Votes
    3 Posts
    5 Views
    A
    Hi Jafet, There are several techniques you can use and returning the VOID pointer is not one of them. There is a VERY nice article by Don Box in MSDN explaining your options and advantages/disadvantages. The name of the article is "OLE Q&A". There are several articles with this name and I add the beginning of the article, so it will be easier to find. Regards, Alex Gorev, Dundas Software. ------------------------------------------------------ " OLE Q&A Don Box Don Box has been working in networking and distributed object systems since 1989. He is currently chronicling the COM lifestyle in book form for Addison Wesley, and gives seminars on OLE and COM across the globe. Don can be reached at dbox@braintrust.com. QI am using dual interfaces to expose my objects to both C++ and Visual BasicТ clients. Designing the interfaces was relatively painless once I passed simple data types as method parameters. I now need to pass user-defined structures as parameters and can't get it to work. Any suggestions? .... " -- MSDN. ------------------------------------------------------ ----- Original Message ----- From: Jafet Sanchez Rodriguez To: Sent: Tuesday, July 04, 2000 11:42 AM Subject: Re: [CodeProject] Re: void* in a parameter in COM function > Hi Alex!! > I want to pass a struct from vc to vb .. > > struct A > { > int a; > int b; > float c; > } > > MYSTRUCT A; >
  • How to get Browser Helper Object pointer ?

    question tutorial
    2
    0 Votes
    2 Posts
    8 Views
    A
    Hi, The instance of the Browser Helper Object is created each time Internet Explorer starts. You can create an instance of the CommBand object while creating BHO object and then set the internal pointer. You can also create singleton component, which will be holding the list of the interface pointers to all BHO objects. Each time the BHO object is created it adds the interface pointer to the table. You can also save any additional information you like. Then you can easily access all available interfaces. Regards, Alex Gorev, Dundas Software.
  • How do i extract a substring from a variant or bstr

    com help question
    3
    0 Votes
    3 Posts
    8 Views
    A
    Hi, Variants store the strings as BSTRs. You can work with BSTR strings using the standard string functions if you convert it using the OLE2A(...) macro. USES_CONVERSION; char *p = strstr(OLE2A(m_bstrData), "Data="); If you have a lot of string operations I recommend you to use the WTL's CString class. It's a light weight template, which duplicate the functionality of the popular MFC's string class. Regards, Alex Gorev, Dundas Software.
  • ATL PROP_DATA_ENTRY

    c++ tutorial question
    4
    0 Votes
    4 Posts
    14 Views
    A
    Hi, First of all if you have a Set/Get functions for the property and it's part of any property page it's better to use PROP_ENTRY macro. Even if you don't use the property page you can always set it to CLSID_NULL. BEGIN_PROP_MAP(...) PROP_ENTRY("StartColor", DISPID_START_COLOR, CLSID_NULL) END_PROP_MAP() The other thing I've noticed is that you use a space in the name of the property. Never use it in the name of the properties, it can cause all kind of problems. Regards, Alex Gorev, Dundas Software.
  • ASP Components

    c++ question
    2
    0 Votes
    2 Posts
    5 Views
    A
    Hi, There are no any restrictions... but ASP components do not have any GUI, so there is no any reason to use MFC. If you need a good string class use WTL instead. So my answer is NO. Because you don't need MFC and it will affect the size and performance of the component comparing to ATL & WTL. Regards, Alex Gorev, Dundas Software.
  • com to save error

    com help tutorial
    4
    0 Votes
    4 Posts
    12 Views
    A
    Hi, Is it a third party COM object, or you designed it by yourself? If you don't have the source code just the DLL file I don't see any ways to MAKE the COM object to write the error messages in the file. Regards, Alex Gorev, Dundas Software.
  • Apartments and multi threaded programming

    question sysadmin help
    2
    0 Votes
    2 Posts
    6 Views
    A
    Hi, I don't understand what problems do you have... To create an Apartment threaded component just select the Attributes page of the ATL Object Wizard Properties and make sure that Threading Model is set to Apartment. It's a default value, so usually you don't have to change anything. Regards, Alex Gorev, Dundas Software.
  • child windows & controls from an add-in

    c++ question com workspace
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Shell Extensions

    linux help question
    2
    0 Votes
    2 Posts
    8 Views
    M
    Check out Part 2 of my series on shell extentions.