![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #11 (permalink) |
| | Re: Adding Files/Links To Projects On 05/09/2008 in message <uwsnnkxDJHA.4760@xxxxxx> Pavel Minaev wrote: Quote: >If you mean CharSet.Ansi vs CharSet.Unicode (or MarshalAs(UnmanagedType)), >then it shouldn't, either. If you mean something else, then I'm curious >what it is. string and it worked fine under x86 but failed under x64. I have added [MarshalAs(UnmanagedType.LPWStr)] and it now works fine under both. Another was using HDM_SETITEMA which works under x86 but not x64, changing it to HDM_SETITEMW works under both. A lot of these definitions will have been carried forward from VB6 days and I only change them if/when they fail. Quote: Quote: >>I can't really analyse it in detail because if it fails I go right back to >> basics and update the prototype completely. It's the greatest of pities that MSFT didn't include namespaces for all their dll's (or at least put prototypes in the help file) >You should have a look at the P/Invoke Interop Assistant: >http://www.codeplex.com/Release/Proj...eleaseId=14120 up there some will be wrong! We really could do with MSFT releasing standard prototypes, I am sure I had a file of them once from MSFT, I'll have to try and find it. Quote: Quote: >>but then VS is not really s desktop development environment if you want to >> do any serious work. >This is a rather strange statement. Lots of desktop applications are >developed using VS and C#; what, in your opinion, is mising to make it a >"desktop development environment"? to prototype them yourself. At least a couple have crept in recently in System.Runtime.InteropServices.ComTypes but where is IContextMenu (and 2 & 3) and the most common one for me IShellFolder? And, of course, #include :-) -- Jeff Gaines Damerham Hampshire UK "Why is it that when we talk to God we're said to be praying, but when God talks to us we're schizophrenic?" |
My System Specs![]() |
| | #12 (permalink) |
| | Re: Adding Files/Links To Projects "Jeff Gaines" <whitedragon@xxxxxx> wrote in message news:xn0futevj1k9qmt002@xxxxxx Quote: > I have just picked one up. In my HDITEM structure I had pszText as a > string and it worked fine under x86 but failed under x64. I have added > [MarshalAs(UnmanagedType.LPWStr)] and it now works fine under both. > Another was using HDM_SETITEMA which works under x86 but not x64, changing > it to HDM_SETITEMW works under both. A lot of these definitions will have > been carried forward from VB6 days and I only change them if/when they > fail. points, and not ANSI ones? I can't really think of any reason why it might work differently... Quote: > I do use that but as long as it's people like me putting the definitions > up there some will be wrong! We really could do with MSFT releasing > standard prototypes, I am sure I had a file of them once from MSFT, I'll > have to try and find it. before, and apparently they are not interested with providing "official" P/Invoke definitions for Win32 API, with .NET or separately. Quote: > Access to the dll's, Interfaces, structures etc. at all - ideally, when you write an app in C#, you just use the managed assemblies, and don't have all that headache. Of course, we aren't quite there yet, but even so, there aren't that many scenarios where P/Invoke or COM interop is really needed in a .NET app today. Keep in mind that as far as Microsoft is concerned, COM is a legacy binary interface. |
My System Specs![]() |
| | #13 (permalink) |
| | Re: Adding Files/Links To Projects On 05/09/2008 in message <eKiFRY1DJHA.4104@xxxxxx> Pavel Minaev wrote: Quote: >You mean unmanaged DLLs? A lot of desktop apps don't need that sort of >thing at all - ideally, when you write an app in C#, you just use the >managed assemblies, and don't have all that headache. Of course, we aren't >quite there yet, but even so, there aren't that many scenarios where >P/Invoke or COM interop is really needed in a .NET app today. Management and I want masked system icons, the Explorer context menu etc. Quote: > >Keep in mind that as far as Microsoft is concerned, COM is a legacy binary >interface. -- Jeff Gaines Damerham Hampshire UK Indecision is the key to flexibility |
My System Specs![]() |
| | #14 (permalink) |
| | Re: Adding Files/Links To Projects "Jeff Gaines" <whitedragon@xxxxxx> wrote in message news:xn0futhn61nzli1003@xxxxxx Quote: Quote: >>You mean unmanaged DLLs? A lot of desktop apps don't need that sort of >>thing at all - ideally, when you write an app in C#, you just use the >>managed assemblies, and don't have all that headache. Of course, we aren't >>quite there yet, but even so, there aren't that many scenarios where >>P/Invoke or COM interop is really needed in a .NET app today. > I guess it depends what you write. Much of my stuff revolves around File > Management and I want masked system icons, the Explorer context menu etc. ![]() Quote: Quote: >>Keep in mind that as far as Microsoft is concerned, COM is a legacy binary >>interface. > Indeed, but where's the replacement... APIs isn't covered (yet?). Though remember the promises, a few years ago, that Longhorn/Vista was going to be .NET-based throughout, with .NET APIs as native ones, and all the unmanaged APIs as wrappers around the former. I wonder if that sort of thing is still in plans for some future Windows version... |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Adding links to the RIGHT side of the start menu... | Vista General | |||
| Re: DLL.config files and MSI Deployment Projects | .NET General | |||
| IE7 won't open links to wmv/mpg files | Vista General | |||
| adding files to pre-existing CD with files on it | Vista music pictures video | |||
| Adding Links to the Links field in IE7 | Vista security | |||