archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • directories in delphi 1 Does anyone know how The fastest way is in fact to perform a quick format on the diskette Since there is no simple API to do that available you simply WinExec format Winexec format com A Q SW SHOW However this forces the user to respond to the prompts format issues You can prevent this by preparing two files The first is a response file that contains the answers to the prompts two empty lines and one line with a n in it Procedure WriteResponsefile Var f System Text Begin System Assign f resp txt Rewrite f WriteLn f WriteLn f WriteLn f n System Close f End The second is a batch file that you then launch Procedure Quickformat Drive A Const batch qf a bat Var f System Text Begin WriteResponseFile System Assign f batch Rewrite f WriteLn f format A Q A batch can delete itself different from a running EXE The files are generated in whatever happens to be the current directory It would probably be smart to set that to the windows TEMP directory first that is guaranteed to be writeable I tested this with D3 Win95B no D1 on this

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0424a.txt (2016-02-14)
    Open archived version from archive



  • or at less if you can tell me how to get partition information from a disk it d be fine Thanks You can use the ShellAPI funciton ShFormatDrive Example const SHFMT DRV A 0 const SHFMT DRV B 1 const SHFMT ID DEFAULT FFFF const SHFMT OPT QUICKFORMAT 0 const SHFMT OPT FULLFORMAT 1 const SHFMT OPT SYSONLY 2 const SHFMT ERROR 1 const SHFMT CANCEL 2 const SHFMT NOFORMAT

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0123.txt (2016-02-14)
    Open archived version from archive


  • By Microsoft MimeOLE V5 00 2014 211 Organization Another Netscape Collabra Server User X MSMail Priority Normal Newsgroups borland public delphi winapi Function SHFormatDrive hWnd HWND Drive Word fmtID Word Options Word Longint StdCall External Shell32 dll Name SHFormatDrive Function

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0323c.txt (2016-02-14)
    Open archived version from archive


  • References Content Type text plain charset us ascii Organization Xapware Technologies Inc Mime Version 1 0 Reply To xavier xapware com Newsgroups borland public delphi winapi I would not attempt to do this programmatically Instead I d just invoke the

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0323b.txt (2016-02-14)
    Open archived version from archive


  • 10 Message ID X Trace dnews 991916721 217 56 77 10 7 Jun 2001 05 25 21 0700 Path dnews Xref dnews borland public delphi winapi 137482 I hope that this will helps you Alberto Spelta Aspel tin it For Show The Network Drive Map Dialog WNetConnectionDialog Handle RESOURCETYPE DISK procedura var InstHandle HINST begin Add map dir InstHandle ShellExecute 0 nil subst exe z ComputerName SharingName nil 0 Remove

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0607a.txt (2016-02-14)
    Open archived version from archive


  • do they in fact ever pass back the volume name so the volume label is never detected Thanks for your input Mike wrote in message news 372564aa 101045320 News Dial Pipex Com Your code Borland seems a bit complicated to me Try this There are 3 functions here two of them return the volume label and serial number the first as a string then second as strings passed by reference All three functions were written under D4 The third function allows the setting of the label Good luck function TForm1 GetVolumeInfo c1 char string requires character drive letter returns name and serial number as string CSVs or call failed several attempts maybe required when calling CDroms see GetVolumeInformation in Win32 Prog reference for call details ok with D4 and win95 var SNumber n1 n2 cardinal Buffer array 0 255 of char s1 string begin SNumber 0 GetVolumeInfo call failed s1 c1 if GetVolumeInformation PChar s1 Buffer SizeOf Buffer SNumber n1 n2 nil 0 then begin GetVolumeInfo buffer IntToStr SNumber end end function TForm1 BGetVolumeInfo c1 char var s1 s2 String Boolean requires character drive letter a string for the name and a string for the serial number Thus a call

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0426a.txt (2016-02-14)
    Open archived version from archive


  • winapi In article Miroslav Ondrisek wrote How can I change floppy serial number e g 1111 2222 in Delphi 4 The Win32 API does not have a high level function for this as far as i m aware Which means you have to do it via low level disk access DeviceIOControl and it requires different code on win9x and NT I have some old 16 bit code for the task Type TMediaID Record This is the MS DOS original MediaID structure wInfoLevel WORD dwSerialNumber LongInt VolLabel ARRAY 0 10 of Char FileSysType ARRAY 0 7 of Char End Procedure SetDiskSerialNum drive word serialNo LongInt drive 1 for A 2 for B etc Var MediaID TMediaID Begin first do a GetMediaID to fill MediaID with valid values asm push ds lea dx MediaID mov cx 0866 mov bx drive mov ax ss mov ds ax mov ax 440D int 21 pop ds end load the new serial number MediaID dwSerialNumber serialNo do a set media ID asm push ds lea dx MediaID mov cx 0846 mov bx drive mov ax ss mov ds ax mov ax 440D int 21 pop ds end End SetDiskSerialNum So if you do not find example

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0616c.txt (2016-02-14)
    Open archived version from archive


  • 511 of Byte procedure ChangeVolumeSerialNumber Drive Char SerialNumber LongWord var Boot TSector begin ReadBoot Drive Boot Move SerialNumber Boot 39 SizeOf SerialNumber WriteBoot Drive Boot end A complication occurs however because reading and writing the boot sector in NT requires completely different code from that used in reading and writing the boot sector in Win95 98 So here s the complete code taking into account the differences between NT and Win95 98 type TSector array 0 511 of Byte procedure ReadBootNT Drive Char var Boot TSector var BytesRead Cardinal H THandle begin H CreateFile PChar Format s UpCase Drive GENERIC READ 0 nil OPEN EXISTING FILE ATTRIBUTE NORMAL 0 if H INVALID HANDLE VALUE then raise Exception Create SysErrorMessage GetLastError try if not ReadFile H Boot SizeOf Boot BytesRead nil then raise Exception Create SysErrorMessage GetLastError finally CloseHandle H end end procedure WriteBootNT Drive Char var Boot TSector var BytesWritten Cardinal H THandle begin H CreateFile PChar Format s UpCase Drive GENERIC WRITE 0 nil OPEN EXISTING FILE ATTRIBUTE NORMAL 0 if H INVALID HANDLE VALUE then raise Exception Create SysErrorMessage GetLastError try if not WriteFile H Boot SizeOf Boot BytesWritten nil then raise Exception Create SysErrorMessage GetLastError finally CloseHandle H end end type TDiocRegisters record EBX EDX ECX EAX EDI ESI Flags LongWord end TVWin32CtlCode ccNone ccVWin32IntIoctl ccVWin32Int25 ccVWin32Int26 ccVWin32Int13 function VWin32 CtlCode TVWin32CtlCode var Regs TDiocRegisters Boolean var Device THandle Count LongWord begin Device CreateFile VWIN32 0 0 nil 0 FILE FLAG DELETE ON CLOSE 0 if Device INVALID HANDLE VALUE then raise Exception Create SysErrorMessage GetLastError try Result DeviceIoControl Device Ord CtlCode Regs SizeOf Regs Regs SizeOf Regs Count nil finally CloseHandle Device end end procedure ReadBoot95 Drive Char var Boot TSector var Regs TDiocRegisters begin with Regs do begin EAX Ord UpCase Drive Ord A EBX

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0616b.txt (2016-02-14)
    Open archived version from archive



  •