Interop.Call windows shell help - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Interop.Call windows shell help (/showthread.php?tid=92863) Interop.Call windows shell help by wincy on 11-08-2009 at 08:19 PM
Hello guys, code:but i don't know what to use as a handler ("pszHandler"). Can someone help me on this? Thanks in advance... RE: Interop.Call windows shell help by Spunky on 11-08-2009 at 08:24 PM
I think pszHandler may be a path to Notepad (for txt files) for example... RE: Interop.Call windows shell help by wincy on 11-09-2009 at 12:10 AM
I tried this: code: But debug says something like: CallDll failed collocation of function "EstimateFileRiskLevel"... What should i do? How should i read the result? Thanks RE: RE: Interop.Call windows shell help by CookieRevised on 11-09-2009 at 01:22 AM
quote:The correct error you get is: "Interop.Call failed to locate function "EstimateFileRiskLevel"" Anyways, the error says it can not locate the function you are trying to execute in the library you told to seek in. In other words, you are using either the wrong name of the function, or you tell it to seek it in the wrong library, or both... In this case, if you read the documentation on MSDN, it is both. The function name is wrong and the library is wrong: quote:So, the library is 'Winshfhc.dll', not 'Shell32.dll'. But it also means that you can't use Interop.Call to call this function as it does not have a public name and Interop.Call can not work with ordinal numbers. In other words: you can not use this Windows API in this way. RE: RE: RE: Interop.Call windows shell help by wincy on 11-09-2009 at 03:26 PM
quote: Sorry, the debuggers display errors in my language, i tried to translate it by myself. quote: Thanks anyway for your help! RE: Interop.Call windows shell help by Ezra on 11-09-2009 at 04:15 PM
I tried creating a C# wrapper for the function however this is the first time I'm attempting to use unsafe code in C# and my C# skills are lacking anyway, so I'm running into some walls. C# code: Trying to use the function with: C# code: but I'm getting an AccessViolationException at the last line (reading the pointer). RE: Interop.Call windows shell help by matty on 11-09-2009 at 05:32 PM
Does something like this help at all? RE: Interop.Call windows shell help by CookieRevised on 11-10-2009 at 07:51 AM
quote:yeah, that is the interface one should be using instead... But I never worked with stuff like that before in Plus! scripting. It has DataBloc::ReadInterfacePtr but I never used it. RE: Interop.Call windows shell help by Ezra on 11-11-2009 at 10:55 PM
Going a bit offtopic, but does anyone know why i'm getting the errors i'm getting in my above C# test? |