Using Win32 functions in Visual FoxPro Image Gallery
URL Monikers
..msdn
CreateURLMonikerEx
FindMediaType
IsValidURL
ObtainUserAgentString
URLDownloadToCacheFile
URLDownloadToFile
UrlMkGetSessionOption
Code examples:
Using the FindMediaType function
Using the FindMediaType function

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
DO decl 

#DEFINE S_OK  0 

#DEFINE CFSTR_MIME_AIFF         "audio/aiff" 
#DEFINE CFSTR_MIME_AVI          "video/avi" 
#DEFINE CFSTR_MIME_BASICAUDIO   "audio/basic" 
#DEFINE CFSTR_MIME_BMP          "image/bmp" 
#DEFINE CFSTR_MIME_FRACTALS     "application/fractals" 
#DEFINE CFSTR_MIME_GIF          "image/gif" 
#DEFINE CFSTR_MIME_HTML         "text/html" 
#DEFINE CFSTR_MIME_JPEG         "image/jpeg" 
#DEFINE CFSTR_MIME_MPEG         "video/mpeg" 
#DEFINE CFSTR_MIME_PDF          "application/pdf" 
#DEFINE CFSTR_MIME_PJPEG        "image/pjpeg" 
#DEFINE CFSTR_MIME_POSTSCRIPT   "application/postscript" 
#DEFINE CFSTR_MIME_QUICKTIME    "video/quicktime" 
#DEFINE CFSTR_MIME_RAWDATA      "application/octet-stream" 
#DEFINE CFSTR_MIME_RAWDATASTRM  "application/octet-stream" 
#DEFINE CFSTR_MIME_RICHTEXT     "text/richtext" 
#DEFINE CFSTR_MIME_TEXT         "text/plain" 
#DEFINE CFSTR_MIME_TIFF         "image/tiff" 
#DEFINE CFSTR_MIME_WAV          "audio/wav" 
#DEFINE CFSTR_MIME_XBM          "image/xbm" 
#DEFINE CFSTR_MIME_X_AIFF       "audio/x-aiff" 
#DEFINE CFSTR_MIME_X_ART        "image/x-jg" 
#DEFINE CFSTR_MIME_X_BITMAP     "image/x-xbitmap" 
#DEFINE CFSTR_MIME_X_EMF        "image/x-emf" 
#DEFINE CFSTR_MIME_X_MSVIDEO    "video/x-msvideo" 
#DEFINE CFSTR_MIME_X_PNG        "image/x-png" 
#DEFINE CFSTR_MIME_X_REALAUDIO  "audio/x-pn-realaudio" 
#DEFINE CFSTR_MIME_X_SGI_MOVIE  "video/x-sgi-movie" 
#DEFINE CFSTR_MIME_X_WAV        "audio/x-wav" 
#DEFINE CFSTR_MIME_X_WMF        "image/x-wmf" 

    CREATE CURSOR csResult (mediatype C(30), clipformat I) 

    = FindType(CFSTR_MIME_AIFF) 
    = FindType(CFSTR_MIME_AVI) 
    = FindType(CFSTR_MIME_BASICAUDIO) 
    = FindType(CFSTR_MIME_BMP) 
    = FindType(CFSTR_MIME_FRACTALS) 
    = FindType(CFSTR_MIME_GIF) 
    = FindType(CFSTR_MIME_HTML) 
    = FindType(CFSTR_MIME_JPEG) 
    = FindType(CFSTR_MIME_MPEG) 
    = FindType(CFSTR_MIME_PDF) 
    = FindType(CFSTR_MIME_PJPEG) 
    = FindType(CFSTR_MIME_POSTSCRIPT) 
    = FindType(CFSTR_MIME_QUICKTIME) 
    = FindType(CFSTR_MIME_RAWDATA) 
    = FindType(CFSTR_MIME_RAWDATASTRM) 
    = FindType(CFSTR_MIME_RICHTEXT) 
    = FindType(CFSTR_MIME_TEXT) 
    = FindType(CFSTR_MIME_TIFF) 
    = FindType(CFSTR_MIME_WAV) 
    = FindType(CFSTR_MIME_XBM) 
    = FindType(CFSTR_MIME_X_AIFF) 
    = FindType(CFSTR_MIME_X_ART) 
    = FindType(CFSTR_MIME_X_BITMAP) 
    = FindType(CFSTR_MIME_X_EMF) 
    = FindType(CFSTR_MIME_X_MSVIDEO) 
    = FindType(CFSTR_MIME_X_PNG) 
    = FindType(CFSTR_MIME_X_REALAUDIO) 
    = FindType(CFSTR_MIME_X_SGI_MOVIE) 
    = FindType(CFSTR_MIME_X_WAV) 
    = FindType(CFSTR_MIME_X_WMF) 

    GO TOP 
    BROW NORMAL NOWAIT 

PROCEDURE FindType (lcMediaType) 
    LOCAL lnClipformat 
    lnClipformat = 0 
    IF FindMediaType(lcMediaType, @lnClipformat) = S_OK 
        INSERT INTO csResult VALUES (lcMediaType, lnClipformat) 
    ELSE 
        INSERT INTO csResult VALUES (lcMediaType, -1) 
    ENDIF 

PROCEDURE decl 
    DECLARE INTEGER FindMediaType IN urlmon; 
        STRING rgszTypes, INTEGER @rgcfTypes 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
2986 bytes  
Created: 2002-04-07 18:38:43  
Modified: 2002-04-07 18:39:01  
Visits in 7 days: 40  
Listed functions:
FindMediaType
Printer friendly API declarations
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.82.78.213)
11 sec.Function: 'SendMessage'
Function group: 'Message and Message Queue'
23 sec.Function: 'GetPriorityClass'
Function group: 'Process and Thread'
37 sec.Function: 'CeEnumDBVolumes'
Function group: 'Remote Application Programming (RAPI)'
49 sec.Function: 'UpdateResource'
Function group: 'Resource'
59 sec.Function: 'FindClose'
Function group: 'File Management'
1.18 min.Example: 'Class library providing access to the System Registry'
1.42 min.Function: 'GetEnvironmentStrings'
Function group: 'Process and Thread'
1.58 min.
2.07 min.Function: 'CeCloseHandle'
Function group: 'Remote Application Programming (RAPI)'
Google
Advertise here!