Microsoft KB Archive/93411

From BetaArchive Wiki

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("calc.scr",csm,vmode,scount)

' Check return value and print results if call successful.

if ret% = 0 then

  Print "Coordinates : ";csm.x1,csm.x2,csm.y1,csm.y2
  Print "Video Mode : ";vmode[0],mode%
  Print "Index of screen image in file : ";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.


Additional reference words: buglist1.00 fixlist2.00 1.00 buglist1.00

KBCategory: kbtool kbprg kbbuglist kbfixlist
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 19, 1994
©1997 Microsoft Corporation. All rights reserved. Legal Notices.