Skip to content

Windows API

Discussions on the APIs of the various versions of Windows

This category can be followed from the open social web via the handle windows-api@forum.codeproject.com

811 Topics 2.7k Posts
  • future of the windows platform

    c++ question learning csharp dotnet
    8
    0 Votes
    8 Posts
    9 Views
    C
    Polity, Here's my recommendation based on your last message. I think you are doing the correct thing by writing low level libraries in C++ and then use C++/CLI as the bridge between managed and unmanaged code. That was exactly the approach I took with my project. However I would not worry about supporting MFC unless there is an absolute business reason. The reason I'm saying this is because if you are going to support .NET then I would use Windows.Forms to supply the user interface. If you are to going to be running mulit-platform then Windows.Forms is supported by Mono. If your application is going to run on Vista you can also write to Windows Presentation Layer. My general point here is that why support MFC and all of its overhead when you are willing to accept the overhead of .NET. In fact WTL is much lighter than MFC anyway. Just another case in point was that Mike Blazack (sp?) the lead developer of MFC was extremely skeptical of .NET Windows Forms initially. I was meetings where he voiced his skepticism. However after a while he began to embrace MFC. I was also a member of the original AFX team that wrote MFC. I liked MFC 1.0 but hated every incarnation of MFC after 1.0 when in 2.0 they added the OLE Doc/View support. The whole Doc/View stuff in MFC was poorly designed and intrusive. A former dev started his own open source initiative (now defunct) that I participated in of a window wrapper that was much light weight than MFC. I would mothball MFC. If you need to do UI in C++ I greatly suggest WTL. If you want a very good open source C++ UI then I'd suggest FoxToolkit, WXWidgets, and I think Qt even has one that is open source for Windows now. Another point if you go .NET. If you write an installer for your application you can include the .NET redistributable in your installer. Microsoft allow you to redistribute the .NET runtime library files so you can install the .NET runtime and write to .NET without having to worry whether or not the client has .NET. >>First: What do you recommend from the story above: .NET or MFC? I guess I already answered that question. >>Second: What about DirectX? just a small mind bothering There are .NET wrappers for DirectX. I haven't written a DirectX app in years however I did write a small DirectX application from C# PRIOR TO the release of the DirectX wrappers. You can do that because DirectX is supported by COM. There is a sample in Adam Nathan's .NET Interoperability book. I think there were some tweaks needed in the IL to m
  • Registry read operation fails on Vista.

    windows-admin security help question
    8
    0 Votes
    8 Posts
    10 Views
    B
    I must have missed that portion about "asInvoker". I thought the node was only to request administrative levels. Thanks for pointing that out. I've embedded this in my legacy apps and the virtualization problems magically disappeared. Kinda klunky way for Microsoft to do things considering I've always had the best intentions and gave a considerable effort to follow the rules, yet, my app needs to be recompiled for Vista when the zillions of apps that blatantly ignored the rules and needed to run the user app as administrator will run fine without being recompiled. (At least this appears to be what Microsoft intended with the virtualization technologies). I'm guessing, in reality, most apps will find issues with this technology just based on the non-intuitive and unorthodox redirections it's performing in the background. It seems the technology will ultimately benefit no one. It's like justifying the means by the end your trying to achieve. If I remember correctly from my schooling, that is a flawed rational for justifying a decision or behavior. Sad part is, I finally get the Joke from all those recent Macintosh commercials. :-O Anyway, thanks again for helping me out. I've passed this information on elsewhere. :rose:
  • opening CRecordset problem..

    help c++ database mysql question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    4 Posts
    3 Views
    B
    Hehe :)) i feel the same way about it. It's even worse when you have to deal with GUI coding for Vista (DPI awareness, Segoe UI fonts handling, UAC etc.) But think about it, Microsoft did lots of usability tests before Vista's release but i guess their testers were some 10 years old kids (probaby dev's kids). There are many proofs for my theory: * candy and shiny Vista's interface (who likes candies - kids, of course) * 100 UAC questions per minute (so you can't harm your precious OS, becouse by default they think you're some stupid kid) * more default games in every next release of windows (like that was the most important part of an OS...) * animated dog used in XP's search window (my favourite, they should hang by balls that guy who invented it) Bartosz Wójcik || PELock Software Copy Protection
  • Code Compiled on Vista won't run on XP

    csharp c++ visual-studio question
    10
    0 Votes
    10 Posts
    9 Views
    P
    I'm a bit of a new programmer, and I'm not quite sure how to go about this :) Could you link me to a guide or the sort, my Google skills are failing me this morning. Thanks ============ Edit: I should play around a bit before asking a silly question. I got the manifest, but it's not much help to me; is VC80.CRT referring to the dll it's needing? Further, is there a way to change the dependency to use an earlier version, such as the one that ships with XP or 2000? Here's the Manifest if anyone's interested: Edit 2: I've done some reading up on how the manifest works, so as to not require direct linking of common Visual C++ files... but I don't think I want to have someone install the VC++ runtime files, when I only need say, one for example. Is it possible to tell Visual Studio to include files like MSVCR80.DLL directly in my exe, so I can have it as a standalone executable? Thanks!
  • 0 Votes
    2 Posts
    2 Views
    J
    Again, Vista ??? I think not. Jonathan Wilkes Darka [Xanya.net]
  • impersonate a user from a print filter

    help question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Block creation of folders on vista [modified]

    json architecture
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Explorer not remembering your Details view?

    com question lounge
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • I just got it...

    question
    2
    0 Votes
    2 Posts
    4 Views
    J
    It doesn't suck. Jonathan Wilkes Darka [Xanya.net]
  • Vista Firewall and Antivir

    question
    7
    0 Votes
    7 Posts
    8 Views
    C
    http://www.avast.com[^] cheers, Chris Maunder CodeProject.com : C++ MVP
  • dotNET 2.0 application failing under Vista

    csharp visual-studio help
    3
    0 Votes
    3 Posts
    3 Views
    S
    Thank you very much - that did the trick. One of my testers can now run the program on Vista 64bit Jon
  • "Install" "setup" to Vista

    help workspace
    4
    0 Votes
    4 Posts
    3 Views
    J
    If that is your complete menifest file, then it's incomplete, try this one. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="MyExe.exe" type="win32"/> <description>MyExe Description</description> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly> regards, Jonathan Wilkes Darka [Xanya.net]
  • Does executable got from XP run on Windows Vista

    csharp c++
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Vista slow?

    question
    12
    0 Votes
    12 Posts
    11 Views
    B
    3 Ghz intel dual core,1gb ram , 512mb video (...vista ultimate) evrything works fine...i must say beter then xp ! its speed is about your hardware ! if you do dot have minimum hardware required for this to work dont try ! it will be hard ! because vista is created for new machines like (dual core processors) high technology if you do not have this ...buy or dont try it will not work good ! bravoone out! :cool: Bravoone
  • ProcessShellCommand crash

    help question
    3
    0 Votes
    3 Posts
    4 Views
    M
    Any chance you're running a 32 bit application on 64 bit Vista? It seems that the 32 bit layer in Vista 64 has at least one bug/feature that is not present, ie: works ;-), in the 32 bit subsystem (WOW64) in XP/2003 64. If you use Msys/Mingw this manifests as a crash/error in some of the shell programs, although it appears the bug was originally "found" by the Cygwin folks: This thread (http://lists-archives.org/mingw-users/05977-msys-and-vista-64.html) has a patch from Cygwin. The issue is some change in parameter handling on the CreateProcess call in the Vista WOW64 layer, but I wonder if there are other WOW64 bugs lurking in there. If you're not running 64 bit don't worry on this particular point, but if you are it might be worth testing to see if it is happy on "native" 32 bit Vista or XP/2k3 64 bit. -- modified at 13:56 Wednesday 28th March, 2007
  • Move from Windows XP to Vista

    3
    0 Votes
    3 Posts
    3 Views
    S
    Thanks for the reply. Since moving to Vista will cost money to my organization, I wanted to move to an OS that does not become EOL in 2 years (Vista32) so that's why I'm associating moving to Vista with moving to 64bit.. We won't want to move twice (once to vista and then to 64) I could validate that my application works on vista by just installing it there, and seeing that it is up and running (without any code change) - I could be doing that if it takes less than lets say 1mw.. As I understood the penalty of running mixed mode is not that low, meaning, to run 32bit apps on a 32bit os (winXP) will perform better than running the same 32bit app on a vista64 on the same machine.. Am I right ? Thanks again.. ____________ Sinan
  • How to use the theme of VC6 to change VISTA?

    com json tutorial question
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Internet Shortcut on Vista 64 Bit

    help
    2
    0 Votes
    2 Posts
    3 Views
    R
    The only way I've been able to get custom icons to stick on IE shortcuts is to create a new shortcut and set the target to "C:\Program Files\Internet Explorer\iexplore.exe" http://www.somewebpage.com
  • Drag files from explorer to VS2005 on Vista?

    12
    0 Votes
    12 Posts
    11 Views
    S
    In the end I just enabled the Administrator account (which has no UAC and such) and I use that for development. It’s a pain but better than any other solution or workaround I’ve heard of so far. Hopefully Microsoft will make VS2005 more tolerable in a future SP. Steve