Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

DOC_INFO (Structures)
 
.
Summary
Unicode version of DOC_INFO structure
Summary
TODO - a short description

C# Definition:

  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  struct DOC_INFO_1W {
    [MarshalAs(UnmanagedType.LPWStr)]
    public string pDocName;
    [MarshalAs(UnmanagedType.LPWStr)]
    public string pOutputFile;
    [MarshalAs(UnmanagedType.LPWStr)]
    public string pDataType;
  }

VB.NET Definition:

  <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
  Structure DOC_INFO_1W
      <MarshalAs(UnmanagedType.LPWStr)> Public pDocName As String
      <MarshalAs(UnmanagedType.LPWStr)> Public pOutputFile As String
      <MarshalAs(UnmanagedType.LPWStr)> Public pDataType As String
  End Structure!!!!User-Defined Field Types:

None.

/// <summary>Windows GDI DOC_INFO structure</summary>

[StructLayout(LayoutKind.Sequential)]

public class DOC_INFO

{

    /// <summary>
    /// Specifies the size, in bytes, of the structure
    /// Once the struct is initialsed use "cbSize = Marshal.SizeOf("the_structure_name") to set the value for cbSize correctly"
    /// </summary>
    public int cbSize = 0;
    /// <summary>Pointer to a null-terminated string that specifies the name of the document</summary>
    [MarshalAs(UnmanagedType.LPStr)]
    public string pDocName = null;
    ///<summary>output file name (or NULL for a printer)</summary>
    [MarshalAs(UnmanagedType.LPStr)]
    public string pOutputFile = null;
    /// <summary>Pointer to a null-terminated string that specifies the type of data used to record the print job.Can be null</summary>
    [MarshalAs(UnmanagedType.LPStr)]
    public string pDataType = null;
    /// <summary>
    /// Specifies additional information about the print job. This member must be zero or a set value
    /// </summary>        
    public Int32 fwType = 0;

}

Notes:

Different from the Ansi invoke! (Unicode uses LPStr)

User-Defined Field Types:

None.

Documentation
DOC_INFO_1W on MSDN

Notes:

Used in the StartDoc function in the gdi32.dll

code snippet

DOC_INFO doc_info = new DOC_INFO();

doc_info.cbSize = Marshal.SizeOf(doc_info);

doc_info.pDocName = filename.ToString();

doc_info.pDataType = null;

doc_info.fwType = 0;

doc_info.pOutputFile = null;

// get printer hDC

StartDoc(hDC, doc_info);

Documentation
DOC_INFO on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions