Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Lily18

@Lily18
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • receiving data
    L Lily18

    My program is a client (c++) that link to an activex dll created in VB. I use this function : hresult = m_connection->LoadData(OLESTR("01"),OLESTR("B20"), 0,0,&ResulVar,OLESTR("thisMachine"),ADO_ODBC , &m_E ); Hresult tells me everything worked fine but ResulVar return empty. ResulVar is a VARIANT. m_E is an object that receive error from the server. It tells me that : ActiveX component can't create object.(usualy, it's when dll are not registred) With an other program in vb I tested the same function an it worked perfectly, so I know my dll are registered. If it can provide me with the error message from m_E, Why the VARIANT doesn't receive the data? Does anyone have a clue? Thanks

    COM c++ com sysadmin help question

  • type mismatch
    L Lily18

    I have a method in a activeX dll ( created in VB) My program is in VC6: I used #import to link with the DLL. virtual HRESULT __stdcall TimeZone ( BSTR mstrPlant, long mlngTime, long * mlngTimeDifference, enum ConneBD enmConneBD, struct _clsErr * * _arg5 ) = 0; It is declared like that in .tlh I call it this way: time_t *ltime; long * timeDiff; ltime = new time_t(); timeDiff = new long(); *ltime = 0; *timeDiff = 0; time( ltime ); struct _clsErr *m_E; hresult = m_t->TimeZone(OLESTR"01"),*ltime,timeDiff,BD_OR,&m_E); hresult tells me that every thing worked fine but timeDiff return empty. I get "type dismatch" from the struc _clsErr.. My parameter's types seem ok.. Can somebody see what I'm doing wrong? thanks, Lily

    COM com question

  • IDispatch:Invoke - Runtime Access Violation error when accessing DISPARARAM &dp
    L Lily18

    did you initialize : VariantInit(va);//your variant and dp.rgvarg = va;//your dispparam with you variant? access violation is often null pointer...!

    COM help question

  • compilation problem with #import
    L Lily18

    I need to use activex dll created in vb in a C++ program. I use vc 6. Here is what I do: #import " MADLL1.dll" \ named_guids no_implementation \ raw_interfaces_only raw_native_types using namespace MADLL1; #import " MADLL2.dll" no_implementation \ no_auto_exclude \ raw_native_types raw_interfaces_only \ named_guids using namespace MADLL2; #import " MADLL3.dll" no_implementation \ no_auto_exclude \ raw_native_types raw_interfaces_only \ named_guids rename("SOMETHING"," SOMETHINGX") \ rename(" SOMETHINGELSE", " SOMETHINGELSE X") \ using namespace MADLL3; My problem is with the third dll. I put rename because I had compilation errors.I taught It was name collision. I did help with these variable but I have still alot of erros of the same kind: Ex : c:\inwork\opc_da_clientmerge\debug\OLEGEUSE.tlh(729) : error C2059: syntax error : 'constant' enum TT_SOMETHING { TTDT_ONE = 0,///Here I should rename these variables TTDT_TWO= 1, TTDT_THREE= 2, TTDT_FOUR= 3 }; Is it normal to rename everything? I don't think so. Here is how I want to use the dll: HRESULT hresult; CLSID clsid; CoInitialize(NULL); //initialize COM library hresult=CLSIDFromProgID(OLESTR("madll.clsConnexion"), &clsid); //retrieve CLSID of component if(FAILED(hresult)) { TRACE_MSG(_T("CDataBD:: GetTypeAttr"),hresult); return hresult; } _clsConnexion *ConDll; //fromdll1 _clsError *Error; //fromdll3 hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(_clsConnexion),(LPVOID *) &t); if(FAILED(hresult)) { TRACE_MSG(_T("CDataBD:: GetTypeAttr"),hresult); return hresult; } //to this point everything works but for the rest I have to load the third dll to test it ConDll ->LoadData("01", "L4", 0, 0, m_Line, "OLE.MachineS", ADO_OLEDB, Error); ConDll->Release(); //call method CoUninitialize(); //Unintialize the COM library I also tried with IDispatch OLECHAR* name = OLESTR("LoadData"); HRESULT hr2 = pDispatch->GetIDsOfNames(IID_NULL, &name, 1, GetUserDefaultLCID(), &dispid); Thinking I could use Invoke.... But I received : DISP_E_UNKNOWNNAME I'm able to use these Interfaces : ITypeLib ITypeInfo I have access to info from the lib but not Invoke... You see that I tried different approches without success. Is it me that don't understand or could it be how the dll was created? I have

    COM com help c++ debugging json
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups