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
  1. Home
  2. General Programming
  3. COM
  4. GetRecordInfoFromGUID returns 0x80029C4A

GetRecordInfoFromGUID returns 0x80029C4A

Scheduled Pinned Locked Moved COM
helpc++comsysadminannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    morenz
    wrote on last edited by
    #1

    Hi folks, I'm developing a DCOM Client/Server project under Win2000 SP4 (both client and server) with VC++ 6.0. An object in this project has to interface with National Instruments Vision Builder 7, which DLLs are registered under \system32 folder (the package works with no problem) In this object, I have to pass an UDT that is a struct containing a safearray of another struct and two integer (that is, the safearray contains the RGB Values of all the points of my image and the two integers keep the image size). These structures are shown below. When I compile, I get MIDL warning 2368: Could not set UUID ... etc etc etc... but I've seen that this can be ignored with no problems. Now, when I run both client and server, I get an error when preparing to pack the safearray. In facts, I call GetRecordInfoFromGuids to build my SafeArray with VT_RECORD. Before, I was not doing error checking and everything seemed to be alright, but I got crashes. Now, that I added an if (FAILED(hr)) statement just after the call, I get a 0x80029C4A value, that is "Cannot load type library/DLL". Here's the structs: typedef [uuid(394143BC-4672-4E14-85DB-A96EBCA5A417), version(1.0), helpstring("RGB Representation of a single point")] struct RGBValue_struct { unsigned char B; //The blue value of the color. unsigned char G; //The green value of the color. unsigned char R; //The red value of the color. unsigned char alpha; //The alpha value of the color, which represents extra information about a color image, such as gamma correction. } RGBValue; typedef // {7F7037D8-C4D5-4b75-9C68-A9627EDE914B} [uuid(7F7037D8-C4D5-4b75-9C68-A9627EDE914B), version(1.0), helpstring("IVA_Data COM Wrapper")] struct COM_IVA_Data { SAFEARRAY(PointFloat) saPoints; int numPoints; int pointIndex; }COM_IVA_Data; Here's the function call : HRESULT Image2Variant (IVA_Image Source, COM_IVA_Image *Dest) { HRESULT hr = 0; // Initializing dimension descriptor for our SafeArray SAFEARRAYBOUND sabRGB[2]; sabRGB[0].lLbound = 0; sabRGB[0].cElements = Source.columns * Source.rows; hr = SafeArrayDestroy(Dest->saPoints); if (hr != 0) { sprintf(logMessage, "CAugVisionEngine - Image2Variant - SafeArrayDestroy Failed (%ld)",hr); WriteLogFile(logMessage); } Dest->saPoints = NULL; IRecordInfo *pUDTRecordInfo = NULL; hr = ::GetRecordInfoFromGuids(LIBID_AugSvrLib, 1,0,0,RGBValue_IID, &pUDTRecordInfo); if (FAILED(hr))

    V 1 Reply Last reply
    0
    • M morenz

      Hi folks, I'm developing a DCOM Client/Server project under Win2000 SP4 (both client and server) with VC++ 6.0. An object in this project has to interface with National Instruments Vision Builder 7, which DLLs are registered under \system32 folder (the package works with no problem) In this object, I have to pass an UDT that is a struct containing a safearray of another struct and two integer (that is, the safearray contains the RGB Values of all the points of my image and the two integers keep the image size). These structures are shown below. When I compile, I get MIDL warning 2368: Could not set UUID ... etc etc etc... but I've seen that this can be ignored with no problems. Now, when I run both client and server, I get an error when preparing to pack the safearray. In facts, I call GetRecordInfoFromGuids to build my SafeArray with VT_RECORD. Before, I was not doing error checking and everything seemed to be alright, but I got crashes. Now, that I added an if (FAILED(hr)) statement just after the call, I get a 0x80029C4A value, that is "Cannot load type library/DLL". Here's the structs: typedef [uuid(394143BC-4672-4E14-85DB-A96EBCA5A417), version(1.0), helpstring("RGB Representation of a single point")] struct RGBValue_struct { unsigned char B; //The blue value of the color. unsigned char G; //The green value of the color. unsigned char R; //The red value of the color. unsigned char alpha; //The alpha value of the color, which represents extra information about a color image, such as gamma correction. } RGBValue; typedef // {7F7037D8-C4D5-4b75-9C68-A9627EDE914B} [uuid(7F7037D8-C4D5-4b75-9C68-A9627EDE914B), version(1.0), helpstring("IVA_Data COM Wrapper")] struct COM_IVA_Data { SAFEARRAY(PointFloat) saPoints; int numPoints; int pointIndex; }COM_IVA_Data; Here's the function call : HRESULT Image2Variant (IVA_Image Source, COM_IVA_Image *Dest) { HRESULT hr = 0; // Initializing dimension descriptor for our SafeArray SAFEARRAYBOUND sabRGB[2]; sabRGB[0].lLbound = 0; sabRGB[0].cElements = Source.columns * Source.rows; hr = SafeArrayDestroy(Dest->saPoints); if (hr != 0) { sprintf(logMessage, "CAugVisionEngine - Image2Variant - SafeArrayDestroy Failed (%ld)",hr); WriteLogFile(logMessage); } Dest->saPoints = NULL; IRecordInfo *pUDTRecordInfo = NULL; hr = ::GetRecordInfoFromGuids(LIBID_AugSvrLib, 1,0,0,RGBValue_IID, &pUDTRecordInfo); if (FAILED(hr))

      V Offline
      V Offline
      Vibhash Jha
      wrote on last edited by
      #2

      just a guess.. i have always seen iid name to be seen as class name.. RGBValue_struct_IID inplace of RGBValue_IID ....in ::GetRecordInfoFromGuids(LIBID_AugSvrLib, 1,0,0,RGBValue_IID, &pUDTRecordInfo); if still problem persists ...need more info .. >>>> cheers vibhash

      M 1 Reply Last reply
      0
      • V Vibhash Jha

        just a guess.. i have always seen iid name to be seen as class name.. RGBValue_struct_IID inplace of RGBValue_IID ....in ::GetRecordInfoFromGuids(LIBID_AugSvrLib, 1,0,0,RGBValue_IID, &pUDTRecordInfo); if still problem persists ...need more info .. >>>> cheers vibhash

        M Offline
        M Offline
        morenz
        wrote on last edited by
        #3

        hi, thank you for the reply! (un)fortunately, it was my fault, because I have currently 2 versions of this project (the MFC and the Service ones), that are slightly different, and I used the wrong type library... Thanks again!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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