CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Vi2

Page 1 of 38 1 2 3 4

Search: Search took 0.10 seconds.

  1. Re: Invoke of JScript function with parameters returns DISP_E_MEMBERNOTFOUND

    In second case you need no using of dpa.cNamedArgs and dpa.rgdispidNamedArgs at all. I.e. dpa.cNamedArgs=0 and dpa.rgdispidNamedArgs=NULL.

    If you still want to use them, look at "Passing...
  2. Replies
    17
    Views
    2,105

    Re: Modify Object by reference

    There is no public variables for (1) Object variable (SomeObject variable is also Object variable). Instead of public variable VB adds 2 methods: get and let. For example, next parts of code are...
  3. Replies
    17
    Views
    2,105

    Re: Modify Object by reference

    Because the VB is able to pass the expression's value by reference. "so.lVar" or 12 or (lVar) are the examples of expression.

    Possible solution is

    i=so.lVar: s=so.sVar
    ModifyByRef i, s...
  4. Re: VS2010&OLE32.dll access violation problem with COM

    Try to use SetErrorInfo(0,NULL) before CoUninitialize() if you sure that there are no active smart-pointers. It may help.
  5. Replies
    14
    Views
    15,992

    Re: Dynamically Loading and Unloading a DLL

    Look at Make group en icons under w95 for example, or search them on the Web.
  6. Replies
    14
    Views
    15,992

    Re: Dynamically Loading and Unloading a DLL

    You can specify the full (absolute or relative) path to DLL to avoid the rules of searching DLLs, i.e.

    Set gTTWLib = gLdr.LoadLibrary(App.Path & "\TTWLib32.dll")
    Set gTTWLib =...
  7. Replies
    14
    Views
    15,992

    Re: Dynamically Loading and Unloading a DLL

    Const MB_OK = &H00000000
    Const MB_OKCANCEL = &H00000001
    Const MB_ABORTRETRYIGNORE = &H00000002
    Const MB_YESNOCANCEL = &H00000003
    Const MB_YESNO = &H00000004
    Const MB_RETRYCANCEL = &H00000005
    ...
  8. Replies
    14
    Views
    15,992

    Re: Dynamically Loading and Unloading a DLL

    This project doesn't save project's GUIDs, so you should remake the references of this ActiveX - remove the old reference and then add it again.

    PS
    "MISSING: DynamicCall ActiveX Control" hides...
  9. Replies
    14
    Views
    15,992

    Re: Dynamically Loading and Unloading a DLL

    Try to find "WSHDynaCall" or "DynaCall" оn the Web:



    IFAIR, VB can only once resolve the DLL path by ChDir function.
  10. Re: Looping through an Array of UDTs - Object Variable Not Set Error

    I think that you make a mistake with "i" variable in first loop. VB/VBA arrays begin from 0 if another base isn't specified.

    So you can use "i = LBound(ArrayOfUDTs)-1" before ForEach or "For i =...
  11. Re: Extracting information from type library in C/C++

    Look at the tool:

    Library TLI
    C:\WINDOWS\System32\TLBINF32.DLL
    TypeLib Information
  12. Replies
    5
    Views
    4,111

    Re: compile c++ dll for visual basic

    moddll.cpp:

    #define ABSTR BSTR

    char pText2[] = "0123456789 123456789 123456789 123456789";

    extern "C" __declspec(dllexport) ABSTR __stdcall PassString(LPSTR pText)
    {
    int pTextLen =...
  13. Replies
    22
    Views
    7,893

    Re: Is OLE automation via Dll possible?

    I recommend you to remove COM call such as CreateObject("Broker.Application") from DllMain fucntion. See Remarks from MSDN "DllMain Callback Function".

    "...Calling functions that require DLLs...
  14. Replies
    6
    Views
    2,614

    Re: passing smart pointer as parameter?

    Use simple interface pointer instead of smart pointer, which is useless here


    void doSomething(ICore* icp) {
    icp->doit(..);
    }and


    ... doSomething(oServer) ...
  15. Replies
    11
    Views
    2,389

    Re: include file for a COM client (consumer)

    I'm glad to hear it, and my world's view isn't shaked. :)


    Look at "TestATL2_i.h", and you will see something like

    MIDL_INTERFACE("XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX")
    Ix : public...
  16. Replies
    11
    Views
    2,389

    Re: include file for a COM client (consumer)

    You should use __uuidof in this case:

    hr = CoCreateInstance (__uuidof(TestStrcut1), // CLSID of coclass
    NULL, // not used - aggregation
    CLSCTX_INPROC_SERVER, ...
  17. Re: typelib issue -- GetRecordInfoFromGuids

    Yes, the Registry keeps full path of type library. But version numbers are also significant.

    MSDN:
    LoadRegTypeLib compares the requested version numbers against those found in the system...
  18. Re: typelib issue -- GetRecordInfoFromGuids

    All parameters from LoadRegTypeLib are reasonable for GetRecordInfoFromGuids.
  19. Replies
    11
    Views
    2,389

    Re: include file for a COM client (consumer)

    Both are needed, but require some modification.

    Also if client doesn't use LIBID, step 1 is sufficient, because all other GUIDs are accessible by __uuidof().
  20. Replies
    11
    Views
    2,389

    Re: include file for a COM client (consumer)

    _i.c is designed for the actual definitions of the IIDs and CLSIDs and requires the include <initguid.h> before. So 2) is unsufficient.

    _i.h is used in #include and requires full path or...
  21. Re: typelib issue -- GetRecordInfoFromGuids

    Look at LoadRegTypeLib description.
  22. Replies
    11
    Views
    2,389

    Re: include file for a COM client (consumer)

    For С++ client #import can be more preferable, because _i.c and _i.h are members of server project.
  23. Replies
    12
    Views
    10,046

    Re: IDispatch and dispinterface

    Interface cannot expose interface, coclass can. That coclass can expose both or only IDispatch to be useful.IMyDispatch exposes only that 4 methods alike IDispatch, but has some prior information...
  24. Replies
    12
    Views
    10,046

    Re: IDispatch and dispinterface

    I'm sorry, but I don't have "Visual Studio 9.0".
    If a class IFoo has declaration "ITestFoo : public IDispatch" and has no more virtual members than IDispatch, what is ITestFoo?

    You can write...
  25. Replies
    12
    Views
    10,046

    Re: IDispatch and dispinterface

    IDL file fragment:

    [
    uuid(BFA48DFC-FB86-4799-8118-0459ED969B6E),
    helpstring("ITestFoo Interface")
    ]
    dispinterface ITestFoo
    {
    properties:
    [id(1)] BSTR Name; // inserted by Vi2
Results 1 to 25 of 931
Page 1 of 38 1 2 3 4





Click Here to Expand Forum to Full Width

Featured