Microsoft KB Archive/93411

= Microsoft Knowledge Base =

MSTest fFileInfo Function Returns Wrong Screen Mode Value
Last reviewed: October 19, 1994

Article ID: Q93411

The information in this article applies to:

- Microsoft Test for Windows, version 1.0

SYMPTOMS
The fFileInfo function always returns a value of 255 for the video mode of an image. The fFileInfo function in TESTSCRN.DLL can be used to get information about a TESTSCRN screen file. Part of this information includes the video mode that the image was captured in.

STATUS
Microsoft has confirmed this to be a bug in Microsoft Test version 1.0 for Windows. This bug was corrected in Microsoft Test version 2.0 for Windows.

MORE INFORMATION
The following code example shows how to call the fFileInfo function, and it also prints the value of the Mode% parameter showing its value.

You can replace the file being tested in the example below with any file that you have created by using fDumpScreen or fDumpWindow.

'$define testscrn '$include 'mstest.inc' dim sCount as pointer to integer dim vMode as pointer to integer dim mode%, count%

' The wRect type structure is defined in MSTEST.INC. global csm as wRect

' Initialize variables. count%=1 vmode = varptr(mode%) scount = varptr(count%)

' Make a call to ffileinfo. ' The file calc.scr is a file created by running the ' TESTSCRN.MST example in the \samples\docs directory. ret%=fFileInfo(&quot;calc.scr&quot;,csm,vmode,scount)

' Check return value and print results if call successful. if ret% = 0 then

Print &quot;Coordinates : &quot;;csm.x1,csm.x2,csm.y1,csm.y2 Print &quot;Video Mode : &quot;;vmode[0],mode% Print &quot;Index of screen image in file : &quot;;scount[0],count% end if

When you run the program you will see that the coordinates are being reported correctly and the index of the screen image is also being reported correctly. However, the video mode will always return a value of 255.