# SetupCopyOEMInf

### C# Signature:

```cs
[DllImport( "setupapi.dll" )]
            public static extern bool SetupCopyOEMInf(

                string                SourceInfFileName,
                string                OEMSourceMediaLocation,
                OemSourceMediaType    OEMSourceMediaType,
                OemCopyStyle        CopyStyle,
                string                DestinationInfFileName,
                int                    DestinationInfFileNameSize,
                ref int                RequiredSize,
                string                DestinationInfFileNameComponent

                );
```

### VB Signature:

```cs
Declare Function SetupCopyOEMInf Lib "setupapi.dll" (TODO) As TODO
```

### User-Defined Types:

```cs
/// <summary>
        /// Driver media type
        /// </summary>
        internal enum OemSourceMediaType 
        {
            SPOST_NONE  = 0,
            SPOST_PATH  = 1,
            SPOST_URL   = 2,
            SPOST_MAX   = 3
        }

        /// <summary>
        /// Driver file copy style
        /// </summary>
        internal enum OemCopyStyle
        {
            SP_COPY_DELETESOURCE    = 0x0000001,   // delete source file on successful copy
            SP_COPY_REPLACEONLY     = 0x0000002,   // copy only if target file already present
            SP_COPY_NEWER           = 0x0000004,   // copy only if source newer than or same as target
            SP_COPY_NEWER_OR_SAME       = SP_COPY_NEWER,
            SP_COPY_NOOVERWRITE     = 0x0000008,   // copy only if target doesn't exist
            SP_COPY_NODECOMP        = 0x0000010,   // don't decompress source file while copying
            SP_COPY_LANGUAGEAWARE       = 0x0000020,   // don't overwrite file of different language
            SP_COPY_SOURCE_ABSOLUTE     = 0x0000040,   // SourceFile is a full source path
            SP_COPY_SOURCEPATH_ABSOLUTE = 0x0000080,   // SourcePathRoot is the full path
            SP_COPY_IN_USE_NEEDS_REBOOT = 0x0000100,   // System needs reboot if file in use
            SP_COPY_FORCE_IN_USE    = 0x0000200,   // Force target-in-use behavior
            SP_COPY_NOSKIP          = 0x0000400,   // Skip is disallowed for this file or section
            SP_FLAG_CABINETCONTINUATION = 0x0000800,   // Used with need media notification
            SP_COPY_FORCE_NOOVERWRITE   = 0x0001000,   // like NOOVERWRITE but no callback nofitication
            SP_COPY_FORCE_NEWER     = 0x0002000,   // like NEWER but no callback nofitication
            SP_COPY_WARNIFSKIP      = 0x0004000,   // system critical file: warn if user tries to skip
            SP_COPY_NOBROWSE        = 0x0008000,   // Browsing is disallowed for this file or section
            SP_COPY_NEWER_ONLY      = 0x0010000,   // copy only if source file newer than target
            SP_COPY_SOURCE_SIS_MASTER   = 0x0020000,   // source is single-instance store master
            SP_COPY_OEMINF_CATALOG_ONLY = 0x0040000,   // (SetupCopyOEMInf only) don't copy INF--just catalog
            SP_COPY_REPLACE_BOOT_FILE   = 0x0080000,   // file must be present upon reboot (i.e., it's needed by the loader), this flag implies a reboot
            SP_COPY_NOPRUNE         = 0x0100000   // never prune this file
        }
```

### Sample Code:

```cs
Platform SDK: Setup API
```

### Sample Code:

```cs
PCTSTR SourceInfFileName,
  PCTSTR OEMSourceMediaLocation,
  DWORD OEMSourceMediaType,
  DWORD CopyStyle,
  PTSTR DestinationInfFileName,
  DWORD DestinationInfFileNameSize,
  PDWORD RequiredSize,
  PTSTR DestinationInfFileNameComponent
```

### Sample Code:

```cs
Order a Platform SDK CD
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pinvokeisalive.gitbook.io/pinvoke/desktopfunctions/setupapi/setupcopyoeminf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
