简体   繁体   中英

A Guide to Windows Hacking for Mac Users?

I am a long-time Mac user looking to gain a decent understanding of Windows. I want to be able to control the environment, understand how the OS fits together and, eventually I guess, think about application development. I'm not really interested in the history except as it is still relevant to Windows 7.

I'm competent with the Mac and UNIX/Linux environment. I live in C, Objective-C, Bash, Python, JavaScript, AppleScript and PHP. As such I want something that is introductory but not aimed at beginners.

Can anyone recommend a decent book (or other resource) to get me started?

TIA

Superficially

Just start using the languages.

Deeper - good places to start digging

  • Window Manager: Read a Windows GUI Hello World C program source code. You should know that things such as WM_ messages exist and know the common types and at least a couple of obscure ones that windows.h uses so you get the feel of Windows APIs. Will probably still use a higher level toolkit like Windows Forms.
  • Registry: It exists. Get a rough idea of how COM component registration and file association and application settings are done.
  • File folders: Read about the layout of user profiles and the important stuff in the machine as a whole including hidden files and folders.
  • COM: Get your head round IUnknown and structured files at a high level. Know that COM != .NET but it is still around.
  • Services: Read about how services are started up and shut down.
  • Authentication: Read in the Win32 API about security APIs. Know the difference between admin and SYSTEM accounts.
  • Scheduling: Read about C Win32 API threading, synchronisation and interlocked operation primitives.
  • Kernel: Read articles comparing Linux, Mac and Win32 execution models, and search for tuning parameters.
  • Display: There are lots of APIs for the screen: DirectX, GDI, GDI+. Get your head round how to stop these different APIs fighting with each other.
  • .NET: Read about the .NET garbage collector and how .NET and non-.NET code interact and are scheduled in the same process at a low level.
  • ADO: Run some tests using C# to see what performance and concurrency you get.
  • WinSock: See GLIB source code for how to cope with differences in Sockets API.

Finally know that you cannot fork Win32 processes in Windows, and that apps are attached at a deep level to licensing related "Desktop" and "Window Station" objects.

这个Petzold的家伙在第一次出现时为Windows编程做了很多“写了这本书”,他还在继续( http://www.charlespetzold.com/books.html

I started on a UNIX machine, went to the Mac, then to Windows, then finally wound up running Windows and Mac together ... on a Mac Pro. Of the languages you mention, C, Python, Javascript and PHP, there aren't really any differences worth talking about between Mac and Windows. AppleScript, obviously, is non-existent and I'm not sure about Objective C, since I don't use it.

I would recommend you use something like VMWare Fusion to make Windows virtual machines on your Mac. That's what I do. That way you can script batch files in Unix and apply them to your Windows environment.

If that's not a possibility, for Bash you can use Cygwin on Windows. It's a UNIX version of the Windows command line, and lets you do pretty much what you can do in UNIX.

It would be worth your while to learn the .Net framework as well. If you are developing for Windows you will probably want to get Visual Studio. Learning C# is about the best thing you could start with, as it is fast becoming the lingua franca of Windows.

I can't point you to any books, since the ones I used to learn Windows are about 10 years old now, but I hope this brief intro helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM