473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

nativeMethod error

GS
I was attempting to use the
Guid("B722BCCB-4E68-101B-A2BC-00AA00404770")
for IOleCommandTarget
and Guid("D30C1661-CDAF-11d0-8A3E-00C04FC9E26E") for interface IwebBrowser2

However I got errro
Error 1 'System.Drawing.NativeMethods' is inaccessible due to its protection
level c:\webCtlExtended\WebCtlExtended.cs 182 50 webCtlExtended
and
Error 2 The type name 'OLECMDID' does not exist in the type
'System.Drawing.NativeMethods'
C:\webCtlExtended\webCtlExtended\WebCtlExtended.cs 182 64 webCtlExtended
for

[DispId(0x1f5)]
NativeMethods.OLECMDF QueryStatusWB([In] NativeMethods.OLECMDID
cmdID);
[DispId(0x1f6)]
void ExecWB([In] NativeMethods.OLECMDID cmdID, [In]
NativeMethods.OLECMDEXECOPT cmdexecopt, ref object pvaIn, IntPtr pvaOut);
it appears that the the guid ofr IWebBrowser is wrong
I am using C3 2008 express with target being .net 3.5
Feb 23 '08 #1
1 4702
GS,

Without seeing the relevant code (a short, complete example would be
better), it's difficult to say.

However, the errors indicate that something else is going on. First, it
seems you are trying to access something that is not visible to your code.
The NativeMethods type in the System.Drawing namespace is more than likely
internal to System.Drawing.dll, so I'm not surprized about this.

What exactly are you trying to do? Are you trying to use the OLECMDID
type in a definition of the IOleCommandTarget and IWebBrowser2 interfaces
that you are declaring yourself? If so, you will have to declare this type
yourself, which isn't too hard given the header file (docobj.h).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"GS" <gs**********************@msnews.Nomail.comwrote in message
news:O1****************@TK2MSFTNGP06.phx.gbl...
>I was attempting to use the
Guid("B722BCCB-4E68-101B-A2BC-00AA00404770")
for IOleCommandTarget
and Guid("D30C1661-CDAF-11d0-8A3E-00C04FC9E26E") for interface
IwebBrowser2

However I got errro
Error 1 'System.Drawing.NativeMethods' is inaccessible due to its
protection
level c:\webCtlExtended\WebCtlExtended.cs 182 50 webCtlExtended
and
Error 2 The type name 'OLECMDID' does not exist in the type
'System.Drawing.NativeMethods'
C:\webCtlExtended\webCtlExtended\WebCtlExtended.cs 182 64 webCtlExtended
for

[DispId(0x1f5)]
NativeMethods.OLECMDF QueryStatusWB([In] NativeMethods.OLECMDID
cmdID);
[DispId(0x1f6)]
void ExecWB([In] NativeMethods.OLECMDID cmdID, [In]
NativeMethods.OLECMDEXECOPT cmdexecopt, ref object pvaIn, IntPtr pvaOut);
it appears that the the guid ofr IWebBrowser is wrong
I am using C3 2008 express with target being .net 3.5

Feb 23 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
1
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.