[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

HaySeed

3/4/2008 1:45:00 AM

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?


4 Answers

Peter Duniho

3/4/2008 1:54:00 AM

0

On Mon, 03 Mar 2008 17:45:21 -0800, HaySeed
<HaySeed@discussions.microsoft.com> wrote:

> 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/librar...(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

HaySeed

3/4/2008 4:52:00 AM

0

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?



"Peter Duniho" wrote:

> On Mon, 03 Mar 2008 17:45:21 -0800, HaySeed
> <HaySeed@discussions.microsoft.com> wrote:
>
> > 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/librar...(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
>

Peter Duniho

3/4/2008 6:53:00 AM

0

On Mon, 03 Mar 2008 20:52:02 -0800, HaySeed
<HaySeed@discussions.microsoft.com> wrote:

> 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

HaySeed

3/4/2008 10:04:00 PM

0

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?




"Peter Duniho" wrote:

> On Mon, 03 Mar 2008 20:52:02 -0800, HaySeed
> <HaySeed@discussions.microsoft.com> wrote:
>
> > 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
>