Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Saving resources to disk?[Solved]

[Help] Saving resources to disk?[Solved]

Posts 1–4 of 4 · Page 1 of 1
master131
[MPGH]master131
[Help] Saving resources to disk?[Solved]
I have a resource file that I would like to save to my HDD during run-time however, I'm getting a 0 byte file. This is what Kevin gave me (and was too lazy to help me after that) /

[php] Private Sub FileFromResource(ByVal resource, ByVal outputDir)
Dim bArray() As Byte = resource
Dim fStream As New IO.FileStream(outputDir, IO.FileMode.OpenOrCreate)
Using bWrite As New IO.BinaryWriter(fStream)
Dim i As Integer = 0
Do Until i = bArray.Length
bWrite.Write(i)
i += 1
Loop
End Using
End Sub[/php]

I'm trying to use it on an mp3 file I imported but no progress..
[php]FileFromResource(My.Resources.BGMusic, "BGMusic.mp3")[/php]
#1 · 15y ago
Jason
Jason
It's because you didn't specify the output directory, just the name of the output file. You need to provide a full path like
Code:
C:\Users\Jason\Documents\myMp3.mp3
But the method is a bit of overkill

Try this:

[php]
IO.File.WriteAllBytes("pathhere", My.Resources.ResourceName)
[/php]
#2 · 15y ago
master131
[MPGH]master131
Quote Originally Posted by Jason View Post
It's because you didn't specify the output directory, just the name of the output file. You need to provide a full path like
Code:
C:\Users\Jason\Documents\myMp3.mp3
But the method is a bit of overkill

Try this:

[php]
IO.File.WriteAllBytes("pathhere", My.Resources.ResourceName)
[/php]
Thanks! Worked like a charm!
#3 · 15y ago
Jason
Jason
Awesome, glad it worked
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None