VC++ 에서 드라이브 포멧을 이렇게 구현하는데요,,,
VC++에서는
LoadLibrary( "fmifs.dll" );
if ( FormatEx == NULL)
{
if( !(FormatEx = (PFORMATEX) GetProcAddress( GetModuleHandle "fmifs.dll"),"FormatEx" )) )
{
return -1;
}
}
...
FormatEx(
RootDirectory,
media, Format,
awchLabel,
QuickFormat,
ClusterSize,
FormatExCallback
);
ㅡㅡ; 델파이에서 하려고 하는데
자꾸 에러가 나서요..
<!--CodeS-->
type
CALLBACKCOMMAND = (PROGRESS, DONEWITHSTRUCTURE, UNKNOWN2, UNKNOWN3, UNKNOWN4,
UNKNOWN5, INSUFFICIENTRIGHTS, UNKNOWN7, UNKNOWN8, UNKNOWN9, UNKNOWNA,
DONE, UNKNOWNC, UNKNOWND, OUTPUT, STRUCTUREPROGRESS);
type
PFMIFSCALLBAC = function (Command: CALLBACKCOMMAND; SubAction: DWORD;
ActionInfo: Pointer): BOOL; stdcall;
type
PFORMATEX = procedure (DriveRoot: PWCHAR; MediaFlag: DWORD; Format: PWCHAR;
wLabel: PWCHAR; QuickFormat: BOOL; ClusterSize: DWORD; Callback: PFMIFSCALLBACK); stdcall;
var
FormatEx: PFORMATEX;
begin
LoadLibrary('fmifs.dll');
if (....) then
...
end;
<!--CodeE-->