DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 30 Jul 2007 13:49:07 +0100,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    dev15


Problem PInvoking SHLoadImageResource   
Hi, I posted in the wrong initially so thats why i've had to post this again
i have the following declaration to PInvoke the SHLoadImageResource
function

<DllImport("coredll.dll")> _

Public Shared Function LoadLibrary( _

ByVal lpLibFileName As String _

) As IntPtr

End Function

<DllImport("aygshell.dll")> _

Public Shared Function SHLoadImageResource( _

ByVal hinst As IntPtr _

, ByVal uIdImageFile As Integer _

) As IntPtr

End Function



I try and use in my code but i'm getting a SystemMethodException, do i need
to use EntryPoint with the ordinal number. If so what is the ordinal number
for SHLoadImageResource in aygshell.dll

Dim hInst As IntPtr = LoadLibrary("Resource.dll")

Dim hImg As IntPtr = SHLoadImageResource(hInst, IDR_PNG1)  <-- Missing
method Exception here

I have checked that aygshell.dll is in the Windows directory
Date:Mon, 30 Jul 2007 13:49:07 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us