PureBasic Interface to ImDisk

Share your advanced PureBasic knowledge/code with the community.
uweb
User
User
Posts: 98
Joined: Wed Mar 15, 2006 9:40 am
Location: Germany

Re: PureBasic Interface to ImDisk

Post by uweb »

Thank you also very much. It's excellent.

A long time ago i was also interested to do somthing with imDisk or something else.
But i saw that it is too difficult for me.

My Goal was to provide a second (filtrated) view to a folder.
e.g. :
c:\photos mirrored to x:\
In x:\ are only photos that match to a dynamic filter (e.g. 2014, italy, petra, ...) visible.

The perfekt way would be :
If i open e.g. 042.jpg and change the filter i could all the same save it.
Or i saw it, change the filter and could all the same open it.

With your work there is a new hope for my idea.
I will check the possibility to do it with your solution.

PS
For all others :
If you get a "not found"-message. Use a simplified path.
Please pardon my English, my native tongue is German.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: PureBasic Interface to ImDisk

Post by JHPJHP »

Hi Liqu,

You're very much welcome.
Liqu wrote:Please let me know if you extend / make it to disk-less system.
Its not my application to extend to a disk-less system, I've only interfaced to the binaries developed by Olof Lagerkvist.
- http://reboot.pro/topic/4333-wish-can-i ... im-images/

---------------------------------------------------------------

Hi uweb,

You're welcome, and thank you for your comments.
uweb wrote:If you get a "not found"-message. Use a simplified path.
Example: CreateDevice (references\imdisk.h: ImDiskCreateDeviceEx)
NativePath Set to TRUE if the FileName parameter specifies an NT native path, such as \??\C:\imagefile.img or FALSE if it specifies a Win32/DOS-style path such as C:\imagefile.img.
---------------------------------------------------------------

Updated:
- updated the binaries from version 1.9.2 to 1.9.4 (version 2.0 beta is being tested)
- fixed a Structure issue that caused the 64bit version of CreateMountableImage to fail
- added some missing compiler settings to various examples

NB*: The example: CreateMountableImage is not dependant on the ImDisk binaries, but complements the package.
- it's also included in my Services, Stuff, and Shellhook post
HanPBF
Enthusiast
Enthusiast
Posts: 564
Joined: Fri Feb 19, 2010 3:42 am

Re: PureBasic Interface to ImDisk

Post by HanPBF »

Hello JHPJHP,

thanks for sharing.

Don't have the time now to test it.

Is it possible to create a RAMDisk without admin privileges?


Thanks a lot!
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: PureBasic Interface to ImDisk

Post by JHPJHP »

Hi HanPBF,

The following is from the first post (modified):
JHPJHP wrote:Request Administrator mode for Windows Vista and above
- CreateDriverService.pb: required to create the virtual device driver service
- DeleteDriverService.pb: required to delete the virtual device driver service (may also need a reboot)
- CreateDevice1.pb (x86 / x64): required by the format-drive window prompt, and the HideDrive registry option
- RemoveDevice1.pb (x86 / x64): required by the HideDrive registry option
- CreateDevice2.pb (x86 / x64): required by the format-drive window prompt, and the HideDrive registry option
- RemoveDevice2.pb (x86 / x64): required by the HideDrive registry option
- MountDevice.pb (x86 / x64): required by the HideDrive registry option
- ExtendDevice.pb (x86 / x64): required by the device driver
- SaveImageFile.pb (x86 / x64): required by the DeviceIoControl function
- SaveImageFileInteractive.pb (x86 / x64): required by the DeviceIoControl function
- GetFormattedGeometry.pb (x86 / x64): required to access the BPB (BIOS Parameter Block)
There are scenarios were admin privileges can be turned off... here is one:

Avoid the format-drive window prompt / Don't need the HideDrive registry option:
- 1. example: MountDevice.pb
---- remove the compiler option: Request Administrator mode for Windows Vista and above
- 2. create a RAM-Disk file using the example: CreateDevice2.pb
- 3. remove the RAM-Disk using the example: RemoveDevice2.pb (do not delete the linked image)
- 4. create a RAM-Disk (memory or linked-file) using the example: MountDevice.pb

Cheers!
HanPBF
Enthusiast
Enthusiast
Posts: 564
Joined: Fri Feb 19, 2010 3:42 am

Re: PureBasic Interface to ImDisk

Post by HanPBF »

Yes, sorry for not reading a little bit more first...

But, thanks for the hints how to prevent admin rights!
I will try this next weekend.
It's for message passing.

But I have first to try WebSocket for HTA / PB-exe.
And COMate, and ADOmate... Not so "basic" things to handle;-)

Hopefully, Microsoft will keep HTAs even in next browser version for enterprise customers...

Thanks again,
have a great week!
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: PureBasic Interface to ImDisk

Post by JHPJHP »

Updated:
- updated the binaries and reference files
-- from v1.9.4 to v2.0.2
- declared additional Functions

NB*: According to the documentation speed and stability have also been improved.

------------------------------------------------------------------------

Updated:
- updated the binaries and reference files
-- from v2.0.2 to v2.0.6 (stable release)

------------------------------------------------------------------------

Updated:
- updated the binaries and reference files
-- from v2.0.6 to v2.0.7

NB*: According to the documentation additional support has been added for Windows 10.

------------------------------------------------------------------------

Updated:
- updated the binaries and reference files
-- from v2.0.7 to v2.0.9 (stable release)
marroh
User
User
Posts: 72
Joined: Wed Aug 06, 2008 8:21 am

Re: PureBasic Interface to ImDisk

Post by marroh »

Thx for the Update! :mrgreen:
PureBASIC v5.41 LTS , Windows v8.1 x64
Forget UNICODE - Keep it BASIC !
User avatar
Imhotheb
User
User
Posts: 10
Joined: Thu Oct 15, 2015 11:46 am

Re: PureBasic Interface to ImDisk

Post by Imhotheb »

Looks very nice ... but the Download is broken
AAT
Enthusiast
Enthusiast
Posts: 256
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to ImDisk

Post by AAT »

Hi, Imhotheb.

I just checked the link: no problems with downloading.
User avatar
Imhotheb
User
User
Posts: 10
Joined: Thu Oct 15, 2015 11:46 am

Re: PureBasic Interface to ImDisk

Post by Imhotheb »

Sorry, that was my fault ... my adblocker refused the connection (don't know why) ... but now i got it.

thx
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: PureBasic Interface to ImDisk

Post by JHPJHP »

Updated:
- latest binaries (2018-12-11)

NB*: I did not do must testing, please let me know of any issues.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: PureBasic Interface to ImDisk

Post by JHPJHP »

Updated:
- latest binaries (v2.1.1.65)

Includes additional Constants, Structures and Functions.

NB*: Tested, doesn't seem to be any issues.
Locked