0

I'm maintaining a port monitor for a virtual printer, and I noticed that some of the interface we implement, including AddPort, have been marked as obsolete (see: http://msdn.microsoft.com/en-us/library/windows/hardware/ff545022(v=VS.85).aspx). Problem is, the documentation doesn't say what methods to use instead.

The port monitor must still have to deal with adding ports though right?

There doesn't seem to be any other non-obsolete replacements in the Monitor2 structure either (see: http://msdn.microsoft.com/en-us/library/windows/hardware/ff557532(v=vs.85).aspx).

Any ideas?

Thanks!

Andy
  • 2,977
  • 2
  • 39
  • 71
  • Perhaps useful: http://stackoverflow.com/questions/901766/writing-windows-port-monitor-basics – Jim Mischel Dec 09 '11 at 17:15
  • @JimMischel Thanks for the link, but I've seen this question already. Infact, one of the Microsoft examples within the answers actually uses the obsolete add port method, which confuses me further! I would have expected that example to have been updated since the days of windows 2000 (which is when the method was obsoleted). Ah well. – Andy Dec 12 '11 at 09:24

1 Answers1

1

Port monitors are distributed components with a server- and client-side DLL. The client-side DLL provides the UI functionality of AddPort with the AddPortUI function. That function sends a request to the monitor's server-side DLL via the XcvData function with DataName set to the string "AddPort". The server component then actually implements the AddPort functionality.

Carey Gregory
  • 6,836
  • 2
  • 26
  • 47
  • Ah, great! I assume the XcvData function will be avalible from XP onwards? It doesn't seem to tell you in the MSDN docs unfortunately. Anyway, we'll give it a test. Thanks a lot! :) – Andy Dec 12 '11 at 09:34