RE: BT_STRUCT* is inaccessible due to its protection level. Only publi

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dan Rogers (danro_at_microsoft.com)
Date: 12/02/04


Date: Thu, 02 Dec 2004 22:06:04 GMT

Hi Pedro,

Instead of returning a struct, you will need to create a class that defines
your data type and return the typed instance.

Best regards

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: BT_STRUCT* is inaccessible due to its protection level. Only
publi
thread-index: AcTTyDFc+Z07t/S/TiuIPvXrcrSktA==
X-WBNR-Posting-Host: 81.193.142.177
From: "=?Utf-8?B?UGVkcm8gQ2FydmFsaG8=?="
<PedroCarvalho@discussions.microsoft.com>
Subject: BT_STRUCT* is inaccessible due to its protection level. Only publi
Date: Fri, 26 Nov 2004 06:57:04 -0800
Lines: 21
Message-ID: <3E27C590-96D5-44DD-8452-9D96018F7108@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
        charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA
03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7650
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I am new to .NET and I was trying to build a C++ web service returning 2
char
strings and 2 doubles. So, I am using a struct containing those 4 variables
and trying to return that struct (BT_STRUCT):

BT_STRUCT __gc* BAWSClass::Call_Bt( String* st_receb )
{
     BT_STRUCT btrs;
               .
               .
     return btrs;
}

When testing that web service (localhost), it returns the following
InvalidOperationException: BT_STRUCT* is inaccessible due to its protection
level. Only public types can be processed.
I've been trying for some time now to solve this but without success.
Certainly, someone in this discussion group can help me or direct me to
info
where to find the solution.
Thanks for your help.
Pedro



Relevant Pages

  • Re: How can I obtain 2 and 4-byte data types?
    ... > Yesterday I found a portability issue I can't seem to get around and ... all my code falls to pieces if there is no data type ... > and still write it in big and little endian?? ... insert padding bytes after any element of a struct (including ...
    (comp.unix.programmer)
  • Re: Using VBA, can I format data so a web server will regard the data as a struct?
    ... The programmers behind this website have set up five methods that I ... The first method returns a website sessionID. ... The household data is supposed to be a "struct" data type. ...
    (microsoft.public.access.modulesdaovba)
  • Using VBA, can I format data so a web server will regard the data as a struct?
    ... The programmers behind this website have set up five methods that I ... The first method returns a website sessionID. ... The household data is supposed to be a "struct" data type. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Using VBA, can I format data so a web server will regard the data as a struct?
    ... The programmers behind this website have set up five methods that I ... The first method returns a website sessionID. ... The household data is supposed to be a "struct" data type. ...
    (microsoft.public.access.modulesdaovba)
  • Re: nested loop use example
    ... any data type. ... struct Double_Link_Node ... C++ Faq: http://www.parashift.com/c++-faq-lite C Faq: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.learn.c-c++ faq: ... Other sites: http://www.josuttis.com -- C++ STL Library book http://www.sgi.com/tech/stl -- Standard Template Library ...
    (comp.lang.cpp)