Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7516807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:15:00+00:00 2026-05-30T01:15:00+00:00

If you have an embedded resource in your VB6 project that contains a binary

  • 0

If you have an embedded resource in your VB6 project that contains a binary file, what code would cause this file to be copied to another location, without ever making a copy of the file on the local system?

I have done something like this before in .NET but I fear it is not possible in VB6.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:15:02+00:00Added an answer on May 30, 2026 at 1:15 am

    From http://support.microsoft.com/kb/q194409/ :

     Public Function SaveResItemToDisk( _
                    ByVal iResourceNum As Integer, _
                    ByVal sResourceType As String, _
                    ByVal sDestFileName As String _
                    ) As Long
            '=============================================
            'Saves a resource item to disk
    
        'Returns 0 on success, error number on failure
        '=============================================
    
        'Example Call:
        ' iRetVal = SaveResItemToDisk(101, "CUSTOM", "C:\myImage.gif")
    
        Dim bytResourceData()   As Byte
        Dim iFileNumOut         As Integer
    
        On Error GoTo SaveResItemToDisk_err
    
        'Retrieve the resource contents (data) into a byte array
        bytResourceData = LoadResData(iResourceNum, sResourceType)
    
        'Get Free File Handle
        iFileNumOut = FreeFile
    
        'Open the output file
        Open sDestFileName For Binary Access Write As #iFileNumOut
    
            'Write the resource to the file
            Put #iFileNumOut, , bytResourceData
    
        'Close the file
        Close #iFileNumOut
    
        'Return 0 for success
        SaveResItemToDisk = 0
    
        Exit Function
    SaveResItemToDisk_err:
        'Return error number
        SaveResItemToDisk = Err.Number
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an assembly that contains an embedded resource. However, when this assembly is
I have a .ico file that is embedded as a resource (build action set
I have an INF file saved as an embedded resource in my C# project.
I have a ASP.NET website that references another project with contains as resx file.
I have problem to make work a resource file. This is my simple code
I have a compiled .NET assembly with a specific resource file embedded (named 'Script.xml').
I have an image (embedded resource) that i can get access to and form
I have a CSS file that is embedded in my assembly. I need to
I have a SQL file added to my VS.NET 2008 project as an embedded
I have a dll that has had an embedded resource in it for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.