Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pedro Carvalho - 26 Nov 2004 14:57 GMT
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
Dan Rogers - 02 Dec 2004 22:06 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.