Q&A

  • VC++ 에서는 이렇게 구현하는데..델파이에서는
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
);


ㅡㅡ; 델파이에서 하려고 하는데
자꾸 에러가 나서요..


1  COMMENTS
  • Profile
    최용일 2008.03.22 05:08
    헤더부터 컨버팅하셔야죠...

    <!--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-->