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. C / C++ / MFC
  4. What the Heck?

What the Heck?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 3 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.
  • R Offline
    R Offline
    Ryan B
    wrote on last edited by
    #1

    Okay, so in a past project I had used IDL to expose a UDT i had in a dll to an excel spreadsheet. The DLL in that case was a straight C++ DLL, no MFC. In this case I have an MFC DLL. I want to expose a UDT to the excel spreadsheet. I have tried, but it does not work. I have the UDT defined in my IDL file, but when I use "references" tool in excel, I dont have access to the type? The code is below. Am I doing something wrong here?

    [
    uuid(A1CCE58E-553D-4394-828C-5227D4526293),
    helpstring("Topic Conversion Library For Tag List")
    ]
    
    /////////////////////////////////////////////////
    // Library Declaration			
    ////////////////////////////////////////////////
    
    library TopicConversionLib
    {
    ///////////////////////////////////////////////
    // Topic Data Type Definition		
    ///////////////////////////////////////////////
    // This will be used to "transport" data info
    // from teh DLL to the VB application
    ///////////////////////////////////////////////
    	
    typedef struct _vb_topic_data
    {
    short	t_num;	 // Topic Number	Short
    float	t_value; // Topic Value		Float
    BSTR	t_name;	 // Topic Name		String
    }	VbTopicData;
    
    [
    	helpstring("topic stuff"),
    	dllname("topic_conversion.dll")
    ]
    module topic_conversion
    {
    
    };
    }
    

    Ryan Baillargeon Software Specialist Fuel Cell Technologies Inc.

    S M 2 Replies Last reply
    0
    • R Ryan B

      Okay, so in a past project I had used IDL to expose a UDT i had in a dll to an excel spreadsheet. The DLL in that case was a straight C++ DLL, no MFC. In this case I have an MFC DLL. I want to expose a UDT to the excel spreadsheet. I have tried, but it does not work. I have the UDT defined in my IDL file, but when I use "references" tool in excel, I dont have access to the type? The code is below. Am I doing something wrong here?

      [
      uuid(A1CCE58E-553D-4394-828C-5227D4526293),
      helpstring("Topic Conversion Library For Tag List")
      ]
      
      /////////////////////////////////////////////////
      // Library Declaration			
      ////////////////////////////////////////////////
      
      library TopicConversionLib
      {
      ///////////////////////////////////////////////
      // Topic Data Type Definition		
      ///////////////////////////////////////////////
      // This will be used to "transport" data info
      // from teh DLL to the VB application
      ///////////////////////////////////////////////
      	
      typedef struct _vb_topic_data
      {
      short	t_num;	 // Topic Number	Short
      float	t_value; // Topic Value		Float
      BSTR	t_name;	 // Topic Name		String
      }	VbTopicData;
      
      [
      	helpstring("topic stuff"),
      	dllname("topic_conversion.dll")
      ]
      module topic_conversion
      {
      
      };
      }
      

      Ryan Baillargeon Software Specialist Fuel Cell Technologies Inc.

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      Don't you need to tag the typedef with a uuid? Steve S [This signature space available for rent]

      1 Reply Last reply
      0
      • R Ryan B

        Okay, so in a past project I had used IDL to expose a UDT i had in a dll to an excel spreadsheet. The DLL in that case was a straight C++ DLL, no MFC. In this case I have an MFC DLL. I want to expose a UDT to the excel spreadsheet. I have tried, but it does not work. I have the UDT defined in my IDL file, but when I use "references" tool in excel, I dont have access to the type? The code is below. Am I doing something wrong here?

        [
        uuid(A1CCE58E-553D-4394-828C-5227D4526293),
        helpstring("Topic Conversion Library For Tag List")
        ]
        
        /////////////////////////////////////////////////
        // Library Declaration			
        ////////////////////////////////////////////////
        
        library TopicConversionLib
        {
        ///////////////////////////////////////////////
        // Topic Data Type Definition		
        ///////////////////////////////////////////////
        // This will be used to "transport" data info
        // from teh DLL to the VB application
        ///////////////////////////////////////////////
        	
        typedef struct _vb_topic_data
        {
        short	t_num;	 // Topic Number	Short
        float	t_value; // Topic Value		Float
        BSTR	t_name;	 // Topic Name		String
        }	VbTopicData;
        
        [
        	helpstring("topic stuff"),
        	dllname("topic_conversion.dll")
        ]
        module topic_conversion
        {
        
        };
        }
        

        Ryan Baillargeon Software Specialist Fuel Cell Technologies Inc.

        M Offline
        M Offline
        MaximE 0
        wrote on last edited by
        #3

        How do you use the VbTopicData?

        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