Unable to create the variable.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dattaforit
    New Member
    • Sep 2006
    • 8

    Unable to create the variable.

    Hi all

    This is my first posting.

    I am using VC++.Net 2003, And using managed code. I have a dll, which i have to use in my code. In the dll there is a structure. I have to create an object of that structure in my VC++.Net code. I am getting error as below. I have already added that dll in the reference.

    d:\WorkArea\Dot NetEldos\From Amit\SolFSNet\H S_Managed3\HS_M anaged3.cpp(18) : error C3635: '::StorageSearc hStruct': undefined native type used in 'SolFS::Storage Search'; imported native types must be defined in the importing source code


    The sample code is as below:

    #include "stdafx.h"
    #include <Windows.h>
    #include <stdlib.h>


    #using <mscorlib.dll >

    using namespace System;
    using namespace SolFS;

    int _tmain()
    {
    try
    {
    SolFS::StorageS earch *sr = new SolFS::StorageS earch;
    }
    catch(Exception *ex)
    {
    Console::WriteL ine(ex);
    return 0;
    }
    return 0;
    }

    Please do the needfull. and help me in creating the variable sr

    Thanking you
  • radcaesar
    Recognized Expert Contributor
    • Sep 2006
    • 759

    #2
    This is because passing the Unmanaged Type. Check with your component.

    Try by defining a empty calss that derives ur current base class

    Comment

    • dattaforit
      New Member
      • Sep 2006
      • 8

      #3
      Thanks for your prompt reply.

      Will you please elaborate it more and clarify more regarding what should i do.

      Comment

      Working...