Runtime information

  • Thread starter Thread starter tasiekk
  • Start date Start date
T

tasiekk

How can i get information in code if exec was execute in cd-rom or in
hard drive ??
My prog should only work from cd-rom so i need to know i code if it was
executed from cd or not.
Ty for any help.
 
Hello, (e-mail address removed)!

t> How can i get information in code if exec was execute in cd-rom or in
t> hard drive ??
t> My prog should only work from cd-rom so i need to know i code if it
t> was
t> executed from cd or not.
t> Ty for any help.


Have a look at GetDriveType(...) win32 API.
See how to call
( http://www.pinvoke.net/search.aspx?search=GetDriveType&namespace=[All] )

Why do you put such constraint on your application?

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Vadym Stetsyak napisal(a):
Hello, (e-mail address removed)!

t> How can i get information in code if exec was execute in cd-rom or in
t> hard drive ??
t> My prog should only work from cd-rom so i need to know i code if it
t> was
t> executed from cd or not.
t> Ty for any help.


Have a look at GetDriveType(...) win32 API.
See how to call
( http://www.pinvoke.net/search.aspx?search=GetDriveType&namespace=[All] )

Why do you put such constraint on your application?
Customer want it, so i must implement it ;)
 
Hello, (e-mail address removed)!

t> Customer want it, so i must implement it ;)

Is it security measure? If it is then other methods must be applied to ensure
that the app is launched from the disk it was written to...

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Back
Top