Print To File

  • Thread starter Thread starter HaySeed
  • Start date Start date
H

HaySeed

I need to print to disk with a dynamic output filename. I have read some
material that would seem to indicate that the way to do this is to use the
Microsoft defined DOCINFO structure and the StartDoc function in the Win32
API. I have checked my Win32 API Bible and found no such reference.

Q.1 - Is this the best approach?

Q2 - What would the code look like?
 
I need to print to disk with a dynamic output filename. I have read some
material that would seem to indicate that the way to do this is to use
the
Microsoft defined DOCINFO structure and the StartDoc function in the
Win32
API. I have checked my Win32 API Bible and found no such reference.

Rather than reading a third-party reference, you might be better off using
the official documentation when you're looking for something specific.

http://msdn2.microsoft.com/en-us/library/ms535793(VS.85).aspx

Beyond that, if you are doing this using unmanaged code, then this is not
the correct newsgroup at all. This newsgroup is for questions pertaining
to programming using the .NET Framework. If you're calling the Win32
StartDoc() function, then by definition this is the wrong place to ask
questions about that.

Pete
 
Thanks for the reply Pete.

I thought Win32 access was a framework issue using p/Invoke. If not, where
would you suggest would be the proper forum for a C# to Win32 question?
 
Thanks for the reply Pete.

I thought Win32 access was a framework issue using p/Invoke. If not,
where
would you suggest would be the proper forum for a C# to Win32 question?

Nothing about your initial post suggested you were using C#. But
regardless, if you don't already know what in the Win32 API you need to
do, your first step is to figure that out, and that should be done in the
context of a newsgroup pertaining to the use of the unmanaged Win32 API.

If you have a specific question about using p/invoke with a particular
Win32 function, then here would be a useful place to ask that question.
At that point, you'd actually have a "C# to Win32 question" and that's
on-topic here. But the mere fact that you're intending to use p/invoke to
get at the Win32 API doesn't mean that questions about how to use the
Win32 API itself are appropriate here.

By the way, I'm not writing this because I'm playing net-cop or anything
like that. The fact is, if you want a good answer to that particular
question, this just isn't the place to ask. You should be asking people
who are more likely to know, and that's in a different newsgroup.

Pete
 
I apologize for the ambiguity. Let me try again.

I need to make a call to the Win32.StartDoc() method from inside C#. Could
you give me insight into what that call would look like?
 
Back
Top