Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Windows.h

Windows.h

Scheduled Pinned Locked Moved Managed C++/CLI
c++json
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Ingles
    wrote on last edited by
    #1

    I'm not in a position to test this out yet, so I decided to ask someone if they knew first :) I've been trying to call a Win32 API function in my MC++ assembly (DnsQuery specifically). After including the necessary DNS header file, it was also pointed out I need to include Windows.h. Anyway, I wasn't sure whether by including Windows.h at the top of any __gc class it would automatically break, I'm sure I've seen an article somewhere mentioning that Windows.h can't be included in the definition for a managed class. I'll try it out when I get home tonight, but in the mean time :) Thanks as always -- Paul "I need the secure packaging of Jockeys. My boys need a house!" - Kramer, in "The Chinese Woman" episode of Seinfeld MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

    N 1 Reply Last reply
    0
    • P Paul Ingles

      I'm not in a position to test this out yet, so I decided to ask someone if they knew first :) I've been trying to call a Win32 API function in my MC++ assembly (DnsQuery specifically). After including the necessary DNS header file, it was also pointed out I need to include Windows.h. Anyway, I wasn't sure whether by including Windows.h at the top of any __gc class it would automatically break, I'm sure I've seen an article somewhere mentioning that Windows.h can't be included in the definition for a managed class. I'll try it out when I get home tonight, but in the mean time :) Thanks as always -- Paul "I need the secure packaging of Jockeys. My boys need a house!" - Kramer, in "The Chinese Woman" episode of Seinfeld MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

      N Offline
      N Offline
      Nick Hodapp
      wrote on last edited by
      #2

      You can certainly #include <windows.h> in your managed C++ assemblies. As was discussed in the thread below this one, there are some symbol conflicts that are easily worked around with #undef. This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

      P 1 Reply Last reply
      0
      • N Nick Hodapp

        You can certainly #include <windows.h> in your managed C++ assemblies. As was discussed in the thread below this one, there are some symbol conflicts that are easily worked around with #undef. This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

        P Offline
        P Offline
        Paul Ingles
        wrote on last edited by
        #3

        Thanks Nick, I tried it in the end and it worked fine, I was only creating a simple wrapper to the DnsQuery API Function, and in the end its all worked quite well. Thanks again, Paul -- Paul "I need the secure packaging of Jockeys. My boys need a house!" - Kramer, in "The Chinese Woman" episode of Seinfeld MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups