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

Search:

Type: Posts; User: marco.bernasconi

Search: Search took 0.01 seconds.

  1. Re: CComPtr System.AccessViolationException

    I've posted a partial code for simplicity.

    The entire class is the following:


    ref class CameraHook
    {
    private:
    int cameraOffset;
    DWORD_PTR dwPtr;
  2. CComPtr System.AccessViolationException

    Hi all,


    I have a C++/CLI console application and I should pass a CComPtr<T> to a class but when I try to access it, occours a System.AccessViolationException.


    Following the main code:

    ...
  3. Replies
    8
    Views
    631

    Re: CoCreateInstance FAILED

    I didn't know that there are different registries for COM class.

    I'm not a guru in this field :)

    Thanks for all!

    Marco
  4. Replies
    8
    Views
    631

    Re: CoCreateInstance FAILED

    That's the trick!!!


    :D

    Thanks!!!
  5. Replies
    8
    Views
    631

    Re: CoCreateInstance FAILED

    Mmmh...in the registry (HKEY_LOCAL_MACHINE/SOFTWARE/Classes) I see OnSSI.OCAdapter.1.

    I've registered it using regasm.
  6. Replies
    8
    Views
    631

    Re: CoCreateInstance FAILED

    Thanks Igor,

    The value is -2147221164.
  7. Replies
    8
    Views
    631

    CoCreateInstance FAILED

    Hi all,

    I'm following a sample from a third part SDK.

    In particular this piece of code:



    CComPtr<INVRAdapter> _adapter;
  8. Replies
    11
    Views
    1,002

    Re: C++ callback to C#

    Thanks a lot...it helps me!



    I've another question about this callback.


    I discovered from documentation that the second param of the DVR_OnCameraCallback must be an array of...
  9. Replies
    11
    Views
    1,002

    Re: C++ callback to C#

    The szCamName now is right.

    But the other values are wrongs again.


    The documentation is the following:
  10. Replies
    11
    Views
    1,002

    Re: C++ callback to C#

    Great HairyMonkeyMan,


    the callback is working!


    If I watch into cI object, I see that the values are wrong but the struct ST_EACH_CAMERA_INFO in the Interop class seems to be correct.


    I...
  11. Replies
    11
    Views
    1,002

    Re: C++ callback to C#

    Yes I've tried also with your code but I don't know how to call:


    _cameraInfo.lpfnCameraCallback = (hS, cI) =>
    {
    // some code
    };


    @HairyMonkeyMan
  12. Replies
    11
    Views
    1,002

    Re: C++ callback to C#

    Do you mean something like this?


    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void DVR_OnCameraCallback(ref UIntPtr hServer, ref ST_EACH_CAMERA_INFO lpstEachCameraInfo);...
  13. Replies
    11
    Views
    1,002

    C++ callback to C#

    Hi all,


    I need to create a C++ callback call in C#.

    Following the third part SDK documentation:
  14. Replies
    8
    Views
    1,836

    Re: Wrapper from C++ to C#

    Thank you!!! It works.



    I have another question. The documentation says:




    The lpOutBuffer must be a struct like the following:
  15. Replies
    8
    Views
    1,836

    Re: Wrapper from C++ to C#

    Hi guys,


    now I'm struggling to make work properly another function, following my piece of code:



    [DllImport("TruVNetSDK.dll")]
    public static extern bool NET_DVR_CaptureJPEGPicture(int...
  16. Replies
    8
    Views
    1,836

    Re: Wrapper from C++ to C#

    Great Tron it's working!

    I think that I will study the MarshalAs attribute :)
  17. Replies
    8
    Views
    1,836

    [RESOLVED] Wrapper from C++ to C#

    Hi all,


    I'm Marco and I'm a .NET software developer. I'm developing a C# console application based on a C++ set of DLLs using the DllImport attribute.

    The C++ DLLs are part of a Video...
Results 1 to 17 of 17


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center