Pages vues depuis 25/07/2007 : 25 379 689
Index du forum »» Création-Développement »» [Résolu] - zzd10h : updates de programmes
30.Langages:Sources/tests> testPROGDIR
PROGDIR is: DH3:Sources/tests
30.Langages:Sources/tests> cd ram:t
30.RAM Disk:T> appdir:testPROGDIR
PROGDIR is: DH3:Sources/tests
#!include! <dos/dos.h>
#!include! <proto/dos.h>
int main(int argc, char **argv)
{
LONG rc = 0;
if(!argc)
{
IDOS->TimedDosRequesterTags(TDR_TitleString, "Test error",
TDR_FormatString, "WB Startup isn't supported",
TDR_GadgetString, "OK",
TDR_ImageType, TDRIMAGE_ERROR,
TAG_END);
return 20;
}
BPTR FH = IDOS->Lock("PROGDIR:", SHARED_LOCK);
if(ZERO != FH)
{
TEXT strFullPath[2048];
if(IDOS->DevNameFromLock(FH, strFullPath, 2048, DN_FULLPATH))
{
IDOS->Printf("PROGDIR is: %s\n", strFullPath);
}
else rc = IDOS->IoErr();
IDOS->UnLock(FH);
}
else
{
rc = IDOS->IoErr();
}
if(0 != rc)
IDOS->PrintFault(rc, "TestErr");
return((int)rc);
}