|
Antwort |
Registriert seit: 7. Feb 2008 12 Beiträge |
#1
Hallo.
Ich würde gern diesen Code verwenden, um Mime-Types von verschiedenen Dateien automatisch heraufzufinden. Das Problem daran ist die .RES Tabelle der Mime-Typen, denn die ist zwar laut Kommentar hier zu finden, doch in der Datei steckt lediglich HTML Code. Allerdings ist die .RC auf der Seite vollständig (Man muss anfangs wieder HTML Code entfernen). Ich habe die dort angebotene .RC vom HTML Code befreit, doch ich bekomme sie einfach nicht in eine .RES kompiliert - und genau deswegen schreibe ich den Beitrag hier. Die BRCC32.exe liegt nun zum compilen im Projektordner, über cmd gebe ich die Zeile dementsprechend an:
Zitat:
BRCC32 mimetypes.rc
Danke |
Zitat |
Registriert seit: 11. Okt 2003 Ort: Elbflorenz 44.063 Beiträge Delphi 12 Athens |
#2
ich würde die .RC/.RES ganz weglassen, alles in ein Konsanten-Array legen und dann darin suchen.
[add]
Delphi-Quellcode:
function GetMIMEType(FileExt: String): String;
const FileTypes: array[0..641] of record Ext, MIME: String; end = ( (Ext: '.3dm'; MIME: 'x-world/x-3dmf'), (Ext: '.3dmf'; MIME: 'x-world/x-3dmf'), (Ext: '.a'; MIME: 'application/octet-stream'), (Ext: '.aab'; MIME: 'application/x-authorware-bin'), (Ext: '.aam'; MIME: 'application/x-authorware-map'), (Ext: '.aas'; MIME: 'application/x-authorware-seg'), (Ext: '.abc'; MIME: 'text/vnd.abc'), (Ext: '.acgi'; MIME: 'text/html'), (Ext: '.afl'; MIME: 'video/animaflex'), (Ext: '.ai'; MIME: 'application/postscript'), (Ext: '.aif'; MIME: 'audio/aiff'), (Ext: '.aif'; MIME: 'audio/x-aiff'), (Ext: '.aifc'; MIME: 'audio/aiff'), (Ext: '.aifc'; MIME: 'audio/x-aiff'), (Ext: '.aiff'; MIME: 'audio/aiff'), (Ext: '.aiff'; MIME: 'audio/x-aiff'), (Ext: '.aim'; MIME: 'application/x-aim'), (Ext: '.aip'; MIME: 'text/x-audiosoft-intra'), (Ext: '.ani'; MIME: 'application/x-navi-animation'), (Ext: '.aos'; MIME: 'application/x-nokia-9000-communicator-add-on-software'), (Ext: '.aps'; MIME: 'application/mime'), (Ext: '.arc'; MIME: 'application/octet-stream'), (Ext: '.arj'; MIME: 'application/arj'), (Ext: '.arj'; MIME: 'application/octet-stream'), (Ext: '.art'; MIME: 'image/x-jg'), (Ext: '.asf'; MIME: 'video/x-ms-asf'), (Ext: '.asm'; MIME: 'text/x-asm'), (Ext: '.asp'; MIME: 'text/asp'), (Ext: '.asx'; MIME: 'application/x-mplayer2'), (Ext: '.asx'; MIME: 'video/x-ms-asf'), (Ext: '.asx'; MIME: 'video/x-ms-asf-plugin'), (Ext: '.au'; MIME: 'audio/basic'), (Ext: '.au'; MIME: 'audio/x-au'), (Ext: '.avi'; MIME: 'application/x-troff-msvideo'), (Ext: '.avi'; MIME: 'video/avi'), (Ext: '.avi'; MIME: 'video/msvideo'), (Ext: '.avi'; MIME: 'video/x-msvideo'), (Ext: '.avs'; MIME: 'video/avs-video'), (Ext: '.bcpio'; MIME: 'application/x-bcpio'), (Ext: '.bin'; MIME: 'application/mac-binary'), (Ext: '.bin'; MIME: 'application/macbinary'), (Ext: '.bin'; MIME: 'application/octet-stream'), (Ext: '.bin'; MIME: 'application/x-binary'), (Ext: '.bin'; MIME: 'application/x-macbinary'), (Ext: '.bm'; MIME: 'image/bmp'), (Ext: '.bmp'; MIME: 'image/bmp'), (Ext: '.bmp'; MIME: 'image/x-windows-bmp'), (Ext: '.boo'; MIME: 'application/book'), (Ext: '.book'; MIME: 'application/book'), (Ext: '.boz'; MIME: 'application/x-bzip2'), (Ext: '.bsh'; MIME: 'application/x-bsh'), (Ext: '.bz'; MIME: 'application/x-bzip'), (Ext: '.bz2'; MIME: 'application/x-bzip2'), (Ext: '.c'; MIME: 'text/plain'), (Ext: '.c'; MIME: 'text/x-c'), (Ext: '.c++'; MIME: 'text/plain'), (Ext: '.cat'; MIME: 'application/vnd.ms-pki.seccat'), (Ext: '.cc'; MIME: 'text/plain'), (Ext: '.cc'; MIME: 'text/x-c'), (Ext: '.ccad'; MIME: 'application/clariscad'), (Ext: '.cco'; MIME: 'application/x-cocoa'), (Ext: '.cdf'; MIME: 'application/cdf'), (Ext: '.cdf'; MIME: 'application/x-cdf'), (Ext: '.cdf'; MIME: 'application/x-netcdf'), (Ext: '.cer'; MIME: 'application/pkix-cert'), (Ext: '.cer'; MIME: 'application/x-x509-ca-cert'), (Ext: '.cha'; MIME: 'application/x-chat'), (Ext: '.chat'; MIME: 'application/x-chat'), (Ext: '.class'; MIME: 'application/java'), (Ext: '.class'; MIME: 'application/java-byte-code'), (Ext: '.class'; MIME: 'application/x-java-class'), (Ext: '.com'; MIME: 'application/octet-stream'), (Ext: '.com'; MIME: 'text/plain'), (Ext: '.conf'; MIME: 'text/plain'), (Ext: '.cpio'; MIME: 'application/x-cpio'), (Ext: '.cpp'; MIME: 'text/x-c'), (Ext: '.cpt'; MIME: 'application/mac-compactpro'), (Ext: '.cpt'; MIME: 'application/x-compactpro'), (Ext: '.cpt'; MIME: 'application/x-cpt'), (Ext: '.crl'; MIME: 'application/pkcs-crl'), (Ext: '.crl'; MIME: 'application/pkix-crl'), (Ext: '.crt'; MIME: 'application/pkix-cert'), (Ext: '.crt'; MIME: 'application/x-x509-ca-cert'), (Ext: '.crt'; MIME: 'application/x-x509-user-cert'), (Ext: '.csh'; MIME: 'application/x-csh'), (Ext: '.csh'; MIME: 'text/x-script.csh'), (Ext: '.css'; MIME: 'application/x-pointplus'), (Ext: '.css'; MIME: 'text/css'), (Ext: '.cxx'; MIME: 'text/plain'), (Ext: '.dcr'; MIME: 'application/x-director'), (Ext: '.deepv'; MIME: 'application/x-deepv'), (Ext: '.def'; MIME: 'text/plain'), (Ext: '.der'; MIME: 'application/x-x509-ca-cert'), (Ext: '.dif'; MIME: 'video/x-dv'), (Ext: '.dir'; MIME: 'application/x-director'), (Ext: '.dl'; MIME: 'video/dl'), (Ext: '.dl'; MIME: 'video/x-dl'), (Ext: '.doc'; MIME: 'application/msword'), (Ext: '.dot'; MIME: 'application/msword'), (Ext: '.dp'; MIME: 'application/commonground'), (Ext: '.drw'; MIME: 'application/drafting'), (Ext: '.dump'; MIME: 'application/octet-stream'), (Ext: '.dv'; MIME: 'video/x-dv'), (Ext: '.dvi'; MIME: 'application/x-dvi'), (Ext: '.dwf'; MIME: 'drawing/x-dwf (old)'), (Ext: '.dwf'; MIME: 'model/vnd.dwf'), (Ext: '.dwg'; MIME: 'application/acad'), (Ext: '.dwg'; MIME: 'image/vnd.dwg'), (Ext: '.dwg'; MIME: 'image/x-dwg'), (Ext: '.dxf'; MIME: 'application/dxf'), (Ext: '.dxf'; MIME: 'image/vnd.dwg'), (Ext: '.dxf'; MIME: 'image/x-dwg'), (Ext: '.dxr'; MIME: 'application/x-director'), (Ext: '.el'; MIME: 'text/x-script.elisp'), (Ext: '.elc'; MIME: 'application/x-bytecode.elisp (compiled elisp)'), (Ext: '.elc'; MIME: 'application/x-elc'), (Ext: '.env'; MIME: 'application/x-envoy'), (Ext: '.eps'; MIME: 'application/postscript'), (Ext: '.es'; MIME: 'application/x-esrehber'), (Ext: '.etx'; MIME: 'text/x-setext'), (Ext: '.evy'; MIME: 'application/envoy'), (Ext: '.evy'; MIME: 'application/x-envoy'), (Ext: '.exe'; MIME: 'application/octet-stream'), (Ext: '.f'; MIME: 'text/plain'), (Ext: '.f'; MIME: 'text/x-fortran'), (Ext: '.f77'; MIME: 'text/x-fortran'), (Ext: '.f90'; MIME: 'text/plain'), (Ext: '.f90'; MIME: 'text/x-fortran'), (Ext: '.fdf'; MIME: 'application/vnd.fdf'), (Ext: '.fif'; MIME: 'application/fractals'), (Ext: '.fif'; MIME: 'image/fif'), (Ext: '.fli'; MIME: 'video/fli'), (Ext: '.fli'; MIME: 'video/x-fli'), (Ext: '.flo'; MIME: 'image/florian'), (Ext: '.flx'; MIME: 'text/vnd.fmi.flexstor'), (Ext: '.fmf'; MIME: 'video/x-atomic3d-feature'), (Ext: '.for'; MIME: 'text/plain'), (Ext: '.for'; MIME: 'text/x-fortran'), (Ext: '.fpx'; MIME: 'image/vnd.fpx'), (Ext: '.fpx'; MIME: 'image/vnd.net-fpx'), (Ext: '.frl'; MIME: 'application/freeloader'), (Ext: '.funk'; MIME: 'audio/make'), (Ext: '.g'; MIME: 'text/plain'), (Ext: '.g3'; MIME: 'image/g3fax'), (Ext: '.gif'; MIME: 'image/gif'), (Ext: '.gl'; MIME: 'video/gl'), (Ext: '.gl'; MIME: 'video/x-gl'), (Ext: '.gsd'; MIME: 'audio/x-gsm'), (Ext: '.gsm'; MIME: 'audio/x-gsm'), (Ext: '.gsp'; MIME: 'application/x-gsp'), (Ext: '.gss'; MIME: 'application/x-gss'), (Ext: '.gtar'; MIME: 'application/x-gtar'), (Ext: '.gz'; MIME: 'application/x-compressed'), (Ext: '.gz'; MIME: 'application/x-gzip'), (Ext: '.gzip'; MIME: 'application/x-gzip'), (Ext: '.gzip'; MIME: 'multipart/x-gzip'), (Ext: '.h'; MIME: 'text/plain'), (Ext: '.h'; MIME: 'text/x-h'), (Ext: '.hdf'; MIME: 'application/x-hdf'), (Ext: '.help'; MIME: 'application/x-helpfile'), (Ext: '.hgl'; MIME: 'application/vnd.hp-hpgl'), (Ext: '.hh'; MIME: 'text/plain'), (Ext: '.hh'; MIME: 'text/x-h'), (Ext: '.hlb'; MIME: 'text/x-script'), (Ext: '.hlp'; MIME: 'application/hlp'), (Ext: '.hlp'; MIME: 'application/x-helpfile'), (Ext: '.hlp'; MIME: 'application/x-winhelp'), (Ext: '.hpg'; MIME: 'application/vnd.hp-hpgl'), (Ext: '.hpgl'; MIME: 'application/vnd.hp-hpgl'), (Ext: '.hqx'; MIME: 'application/binhex'), (Ext: '.hqx'; MIME: 'application/binhex4'), (Ext: '.hqx'; MIME: 'application/mac-binhex'), (Ext: '.hqx'; MIME: 'application/mac-binhex40'), (Ext: '.hqx'; MIME: 'application/x-binhex40'), (Ext: '.hqx'; MIME: 'application/x-mac-binhex40'), (Ext: '.hta'; MIME: 'application/hta'), (Ext: '.htc'; MIME: 'text/x-component'), (Ext: '.htm'; MIME: 'text/html'), (Ext: '.html'; MIME: 'text/html'), (Ext: '.htmls'; MIME: 'text/html'), (Ext: '.htt'; MIME: 'text/webviewhtml'), (Ext: '.htx'; MIME: 'text/html'), (Ext: '.ice'; MIME: 'x-conference/x-cooltalk'), (Ext: '.ico'; MIME: 'image/x-icon'), (Ext: '.idc'; MIME: 'text/plain'), (Ext: '.ief'; MIME: 'image/ief'), (Ext: '.iefs'; MIME: 'image/ief'), (Ext: '.iges'; MIME: 'application/iges'), (Ext: '.iges'; MIME: 'model/iges'), (Ext: '.igs'; MIME: 'application/iges'), (Ext: '.igs'; MIME: 'model/iges'), (Ext: '.ima'; MIME: 'application/x-ima'), (Ext: '.imap'; MIME: 'application/x-httpd-imap'), (Ext: '.inf'; MIME: 'application/inf'), (Ext: '.ins'; MIME: 'application/x-internett-signup'), (Ext: '.ip'; MIME: 'application/x-ip2'), (Ext: '.isu'; MIME: 'video/x-isvideo'), (Ext: '.it'; MIME: 'audio/it'), (Ext: '.iv'; MIME: 'application/x-inventor'), (Ext: '.ivr'; MIME: 'i-world/i-vrml'), (Ext: '.ivy'; MIME: 'application/x-livescreen'), (Ext: '.jam'; MIME: 'audio/x-jam'), (Ext: '.jav'; MIME: 'text/plain'), (Ext: '.jav'; MIME: 'text/x-java-source'), (Ext: '.java'; MIME: 'text/plain'), (Ext: '.java'; MIME: 'text/x-java-source'), (Ext: '.jcm'; MIME: 'application/x-java-commerce'), (Ext: '.jfif'; MIME: 'image/jpeg'), (Ext: '.jfif'; MIME: 'image/pjpeg'), (Ext: '.jfif-tbnl';MIME: 'image/jpeg'), (Ext: '.jpe'; MIME: 'image/jpeg'), (Ext: '.jpe'; MIME: 'image/pjpeg'), (Ext: '.jpeg'; MIME: 'image/jpeg'), (Ext: '.jpeg'; MIME: 'image/pjpeg'), (Ext: '.jpg'; MIME: 'image/jpeg'), (Ext: '.jpg'; MIME: 'image/pjpeg'), (Ext: '.jps'; MIME: 'image/x-jps'), (Ext: '.js'; MIME: 'application/x-javascript'), (Ext: '.jut'; MIME: 'image/jutvision'), (Ext: '.kar'; MIME: 'audio/midi'), (Ext: '.kar'; MIME: 'music/x-karaoke'), (Ext: '.ksh'; MIME: 'application/x-ksh'), (Ext: '.ksh'; MIME: 'text/x-script.ksh'), (Ext: '.la'; MIME: 'audio/nspaudio'), (Ext: '.la'; MIME: 'audio/x-nspaudio'), (Ext: '.lam'; MIME: 'audio/x-liveaudio'), (Ext: '.latex'; MIME: 'application/x-latex'), (Ext: '.lha'; MIME: 'application/lha'), (Ext: '.lha'; MIME: 'application/octet-stream'), (Ext: '.lha'; MIME: 'application/x-lha'), (Ext: '.lhx'; MIME: 'application/octet-stream'), (Ext: '.list'; MIME: 'text/plain'), (Ext: '.lma'; MIME: 'audio/nspaudio'), (Ext: '.lma'; MIME: 'audio/x-nspaudio'), (Ext: '.log'; MIME: 'text/plain'), (Ext: '.lsp'; MIME: 'application/x-lisp'), (Ext: '.lsp'; MIME: 'text/x-script.lisp'), (Ext: '.lst'; MIME: 'text/plain'), (Ext: '.lsx'; MIME: 'text/x-la-asf'), (Ext: '.ltx'; MIME: 'application/x-latex'), (Ext: '.lzh'; MIME: 'application/octet-stream'), (Ext: '.lzh'; MIME: 'application/x-lzh'), (Ext: '.lzx'; MIME: 'application/lzx'), (Ext: '.lzx'; MIME: 'application/octet-stream'), (Ext: '.lzx'; MIME: 'application/x-lzx'), (Ext: '.m'; MIME: 'text/plain'), (Ext: '.m'; MIME: 'text/x-m'), (Ext: '.m1v'; MIME: 'video/mpeg'), (Ext: '.m2a'; MIME: 'audio/mpeg'), (Ext: '.m2v'; MIME: 'video/mpeg'), (Ext: '.m3u'; MIME: 'audio/x-mpequrl'), (Ext: '.man'; MIME: 'application/x-troff-man'), (Ext: '.map'; MIME: 'application/x-navimap'), (Ext: '.mar'; MIME: 'text/plain'), (Ext: '.mbd'; MIME: 'application/mbedlet'), (Ext: '.mc$'; MIME: 'application/x-magic-cap-package-1.0'), (Ext: '.mcd'; MIME: 'application/mcad'), (Ext: '.mcd'; MIME: 'application/x-mathcad'), (Ext: '.mcf'; MIME: 'image/vasa'), (Ext: '.mcf'; MIME: 'text/mcf'), (Ext: '.mcp'; MIME: 'application/netmc'), (Ext: '.me'; MIME: 'application/x-troff-me'), (Ext: '.mht'; MIME: 'message/rfc822'), (Ext: '.mhtml'; MIME: 'message/rfc822'), (Ext: '.mid'; MIME: 'application/x-midi'), (Ext: '.mid'; MIME: 'audio/midi'), (Ext: '.mid'; MIME: 'audio/x-mid'), (Ext: '.mid'; MIME: 'audio/x-midi'), (Ext: '.mid'; MIME: 'music/crescendo'), (Ext: '.mid'; MIME: 'x-music/x-midi'), (Ext: '.midi'; MIME: 'application/x-midi'), (Ext: '.midi'; MIME: 'audio/midi'), (Ext: '.midi'; MIME: 'audio/x-mid'), (Ext: '.midi'; MIME: 'audio/x-midi'), (Ext: '.midi'; MIME: 'music/crescendo'), (Ext: '.midi'; MIME: 'x-music/x-midi'), (Ext: '.mif'; MIME: 'application/x-frame'), (Ext: '.mif'; MIME: 'application/x-mif'), (Ext: '.mime'; MIME: 'message/rfc822'), (Ext: '.mime'; MIME: 'www/mime'), (Ext: '.mjf'; MIME: 'audio/x-vnd.audioexplosion.mjuicemediafile'), (Ext: '.mjpg'; MIME: 'video/x-motion-jpeg'), (Ext: '.mm'; MIME: 'application/base64'), (Ext: '.mm'; MIME: 'application/x-meme'), (Ext: '.mme'; MIME: 'application/base64'), (Ext: '.mod'; MIME: 'audio/mod'), (Ext: '.mod'; MIME: 'audio/x-mod'), (Ext: '.moov'; MIME: 'video/quicktime'), (Ext: '.mov'; MIME: 'video/quicktime'), (Ext: '.movie'; MIME: 'video/x-sgi-movie'), (Ext: '.mp2'; MIME: 'audio/mpeg'), (Ext: '.mp2'; MIME: 'audio/x-mpeg'), (Ext: '.mp2'; MIME: 'video/mpeg'), (Ext: '.mp2'; MIME: 'video/x-mpeg'), (Ext: '.mp2'; MIME: 'video/x-mpeq2a'), (Ext: '.mp3'; MIME: 'audio/mpeg3'), (Ext: '.mp3'; MIME: 'audio/x-mpeg-3'), (Ext: '.mp3'; MIME: 'video/mpeg'), (Ext: '.mp3'; MIME: 'video/x-mpeg'), (Ext: '.mpa'; MIME: 'audio/mpeg'), (Ext: '.mpa'; MIME: 'video/mpeg'), (Ext: '.mpc'; MIME: 'application/x-project'), (Ext: '.mpe'; MIME: 'video/mpeg'), (Ext: '.mpeg'; MIME: 'video/mpeg'), (Ext: '.mpg'; MIME: 'audio/mpeg'), (Ext: '.mpg'; MIME: 'video/mpeg'), (Ext: '.mpga'; MIME: 'audio/mpeg'), (Ext: '.mpp'; MIME: 'application/vnd.ms-project'), (Ext: '.mpt'; MIME: 'application/x-project'), (Ext: '.mpv'; MIME: 'application/x-project'), (Ext: '.mpx'; MIME: 'application/x-project'), (Ext: '.mrc'; MIME: 'application/marc'), (Ext: '.ms'; MIME: 'application/x-troff-ms'), (Ext: '.mv'; MIME: 'video/x-sgi-movie'), (Ext: '.my'; MIME: 'audio/make'), (Ext: '.mzz'; MIME: 'application/x-vnd.audioexplosion.mzz'), (Ext: '.nap'; MIME: 'image/naplps'), (Ext: '.naplps'; MIME: 'image/naplps'), (Ext: '.nc'; MIME: 'application/x-netcdf'), (Ext: '.ncm'; MIME: 'application/vnd.nokia.configuration-message'), (Ext: '.nif'; MIME: 'image/x-niff'), (Ext: '.niff'; MIME: 'image/x-niff'), (Ext: '.nix'; MIME: 'application/x-mix-transfer'), (Ext: '.nsc'; MIME: 'application/x-conference'), (Ext: '.nvd'; MIME: 'application/x-navidoc'), (Ext: '.o'; MIME: 'application/octet-stream'), (Ext: '.oda'; MIME: 'application/oda'), (Ext: '.omc'; MIME: 'application/x-omc'), (Ext: '.omcd'; MIME: 'application/x-omcdatamaker'), (Ext: '.omcr'; MIME: 'application/x-omcregerator'), (Ext: '.p'; MIME: 'text/x-pascal'), (Ext: '.p10'; MIME: 'application/pkcs10'), (Ext: '.p10'; MIME: 'application/x-pkcs10'), (Ext: '.p12'; MIME: 'application/pkcs-12'), (Ext: '.p12'; MIME: 'application/x-pkcs12'), (Ext: '.p7a'; MIME: 'application/x-pkcs7-signature'), (Ext: '.p7c'; MIME: 'application/pkcs7-mime'), (Ext: '.p7c'; MIME: 'application/x-pkcs7-mime'), (Ext: '.p7m'; MIME: 'application/pkcs7-mime'), (Ext: '.p7m'; MIME: 'application/x-pkcs7-mime'), (Ext: '.p7r'; MIME: 'application/x-pkcs7-certreqresp'), (Ext: '.p7s'; MIME: 'application/pkcs7-signature'), (Ext: '.part'; MIME: 'application/pro_eng'), (Ext: '.pas'; MIME: 'text/pascal'), (Ext: '.pbm'; MIME: 'image/x-portable-bitmap'), (Ext: '.pcl'; MIME: 'application/vnd.hp-pcl'), (Ext: '.pcl'; MIME: 'application/x-pcl'), (Ext: '.pct'; MIME: 'image/x-pict'), (Ext: '.pcx'; MIME: 'image/x-pcx'), (Ext: '.pdb'; MIME: 'chemical/x-pdb'), (Ext: '.pdf'; MIME: 'application/pdf'), (Ext: '.pfunk'; MIME: 'audio/make'), (Ext: '.pfunk'; MIME: 'audio/make.my.funk'), (Ext: '.pgm'; MIME: 'image/x-portable-graymap'), (Ext: '.pgm'; MIME: 'image/x-portable-greymap'), (Ext: '.pic'; MIME: 'image/pict'), (Ext: '.pict'; MIME: 'image/pict'), (Ext: '.pkg'; MIME: 'application/x-newton-compatible-pkg'), (Ext: '.pko'; MIME: 'application/vnd.ms-pki.pko'), (Ext: '.pl'; MIME: 'text/plain'), (Ext: '.pl'; MIME: 'text/x-script.perl'), (Ext: '.plx'; MIME: 'application/x-pixclscript'), (Ext: '.pm'; MIME: 'image/x-xpixmap'), (Ext: '.pm'; MIME: 'text/x-script.perl-module'), (Ext: '.pm4'; MIME: 'application/x-pagemaker'), (Ext: '.pm5'; MIME: 'application/x-pagemaker'), (Ext: '.png'; MIME: 'image/png'), (Ext: '.pnm'; MIME: 'application/x-portable-anymap'), (Ext: '.pnm'; MIME: 'image/x-portable-anymap'), (Ext: '.pot'; MIME: 'application/mspowerpoint'), (Ext: '.pot'; MIME: 'application/vnd.ms-powerpoint'), (Ext: '.pov'; MIME: 'model/x-pov'), (Ext: '.ppa'; MIME: 'application/vnd.ms-powerpoint'), (Ext: '.ppm'; MIME: 'image/x-portable-pixmap'), (Ext: '.pps'; MIME: 'application/mspowerpoint'), (Ext: '.pps'; MIME: 'application/vnd.ms-powerpoint'), (Ext: '.ppt'; MIME: 'application/mspowerpoint'), (Ext: '.ppt'; MIME: 'application/powerpoint'), (Ext: '.ppt'; MIME: 'application/vnd.ms-powerpoint'), (Ext: '.ppt'; MIME: 'application/x-mspowerpoint'), (Ext: '.ppz'; MIME: 'application/mspowerpoint'), (Ext: '.pre'; MIME: 'application/x-freelance'), (Ext: '.prt'; MIME: 'application/pro_eng'), (Ext: '.ps'; MIME: 'application/postscript'), (Ext: '.psd'; MIME: 'application/octet-stream'), (Ext: '.pvu'; MIME: 'paleovu/x-pv'), (Ext: '.pwz'; MIME: 'application/vnd.ms-powerpoint'), (Ext: '.py'; MIME: 'text/x-script.phyton'), (Ext: '.pyc'; MIME: 'applicaiton/x-bytecode.python'), (Ext: '.qcp'; MIME: 'audio/vnd.qcelp'), (Ext: '.qd3'; MIME: 'x-world/x-3dmf'), (Ext: '.qd3d'; MIME: 'x-world/x-3dmf'), (Ext: '.qif'; MIME: 'image/x-quicktime'), (Ext: '.qt'; MIME: 'video/quicktime'), (Ext: '.qtc'; MIME: 'video/x-qtc'), (Ext: '.qti'; MIME: 'image/x-quicktime'), (Ext: '.qtif'; MIME: 'image/x-quicktime'), (Ext: '.ra'; MIME: 'audio/x-pn-realaudio'), (Ext: '.ra'; MIME: 'audio/x-pn-realaudio-plugin'), (Ext: '.ra'; MIME: 'audio/x-realaudio'), (Ext: '.ram'; MIME: 'audio/x-pn-realaudio'), (Ext: '.ras'; MIME: 'application/x-cmu-raster'), (Ext: '.ras'; MIME: 'image/cmu-raster'), (Ext: '.ras'; MIME: 'image/x-cmu-raster'), (Ext: '.rast'; MIME: 'image/cmu-raster'), (Ext: '.rexx'; MIME: 'text/x-script.rexx'), (Ext: '.rf'; MIME: 'image/vnd.rn-realflash'), (Ext: '.rgb'; MIME: 'image/x-rgb'), (Ext: '.rm'; MIME: 'application/vnd.rn-realmedia'), (Ext: '.rm'; MIME: 'audio/x-pn-realaudio'), (Ext: '.rmi'; MIME: 'audio/mid'), (Ext: '.rmm'; MIME: 'audio/x-pn-realaudio'), (Ext: '.rmp'; MIME: 'audio/x-pn-realaudio'), (Ext: '.rmp'; MIME: 'audio/x-pn-realaudio-plugin'), (Ext: '.rng'; MIME: 'application/ringing-tones'), (Ext: '.rng'; MIME: 'application/vnd.nokia.ringing-tone'), (Ext: '.rnx'; MIME: 'application/vnd.rn-realplayer'), (Ext: '.roff'; MIME: 'application/x-troff'), (Ext: '.rp'; MIME: 'image/vnd.rn-realpix'), (Ext: '.rpm'; MIME: 'audio/x-pn-realaudio-plugin'), (Ext: '.rt'; MIME: 'text/richtext'), (Ext: '.rt'; MIME: 'text/vnd.rn-realtext'), (Ext: '.rtf'; MIME: 'application/rtf'), (Ext: '.rtf'; MIME: 'application/x-rtf'), (Ext: '.rtf'; MIME: 'text/richtext'), (Ext: '.rtx'; MIME: 'application/rtf'), (Ext: '.rtx'; MIME: 'text/richtext'), (Ext: '.rv'; MIME: 'video/vnd.rn-realvideo'), (Ext: '.s'; MIME: 'text/x-asm'), (Ext: '.s3m'; MIME: 'audio/s3m'), (Ext: '.saveme'; MIME: 'application/octet-stream'), (Ext: '.sbk'; MIME: 'application/x-tbook'), (Ext: '.scm'; MIME: 'application/x-lotusscreencam'), (Ext: '.scm'; MIME: 'text/x-script.guile'), (Ext: '.scm'; MIME: 'text/x-script.scheme'), (Ext: '.scm'; MIME: 'video/x-scm'), (Ext: '.sdml'; MIME: 'text/plain'), (Ext: '.sdp'; MIME: 'application/sdp'), (Ext: '.sdp'; MIME: 'application/x-sdp'), (Ext: '.sdr'; MIME: 'application/sounder'), (Ext: '.sea'; MIME: 'application/sea'), (Ext: '.sea'; MIME: 'application/x-sea'), (Ext: '.set'; MIME: 'application/set'), (Ext: '.sgm'; MIME: 'text/sgml'), (Ext: '.sgm'; MIME: 'text/x-sgml'), (Ext: '.sgml'; MIME: 'text/sgml'), (Ext: '.sgml'; MIME: 'text/x-sgml'), (Ext: '.sh'; MIME: 'application/x-bsh'), (Ext: '.sh'; MIME: 'application/x-sh'), (Ext: '.sh'; MIME: 'application/x-shar'), (Ext: '.sh'; MIME: 'text/x-script.sh'), (Ext: '.shar'; MIME: 'application/x-bsh'), (Ext: '.shar'; MIME: 'application/x-shar'), (Ext: '.shtml'; MIME: 'text/html'), (Ext: '.shtml'; MIME: 'text/x-server-parsed-html'), (Ext: '.sid'; MIME: 'audio/x-psid'), (Ext: '.sit'; MIME: 'application/x-sit'), (Ext: '.sit'; MIME: 'application/x-stuffit'), (Ext: '.skd'; MIME: 'application/x-koan'), (Ext: '.skm'; MIME: 'application/x-koan'), (Ext: '.skp'; MIME: 'application/x-koan'), (Ext: '.skt'; MIME: 'application/x-koan'), (Ext: '.sl'; MIME: 'application/x-seelogo'), (Ext: '.smi'; MIME: 'application/smil'), (Ext: '.smil'; MIME: 'application/smil'), (Ext: '.snd'; MIME: 'audio/basic'), (Ext: '.snd'; MIME: 'audio/x-adpcm'), (Ext: '.sol'; MIME: 'application/solids'), (Ext: '.spc'; MIME: 'application/x-pkcs7-certificates'), (Ext: '.spc'; MIME: 'text/x-speech'), (Ext: '.spl'; MIME: 'application/futuresplash'), (Ext: '.spr'; MIME: 'application/x-sprite'), (Ext: '.sprite'; MIME: 'application/x-sprite'), (Ext: '.src'; MIME: 'application/x-wais-source'), (Ext: '.ssi'; MIME: 'text/x-server-parsed-html'), (Ext: '.ssm'; MIME: 'application/streamingmedia'), (Ext: '.sst'; MIME: 'application/vnd.ms-pki.certstore'), (Ext: '.step'; MIME: 'application/step'), (Ext: '.stl'; MIME: 'application/sla'), (Ext: '.stl'; MIME: 'application/vnd.ms-pki.stl'), (Ext: '.stl'; MIME: 'application/x-navistyle'), (Ext: '.stp'; MIME: 'application/step'), (Ext: '.sv4cpio'; MIME: 'application/x-sv4cpio'), (Ext: '.sv4crc'; MIME: 'application/x-sv4crc'), (Ext: '.svf'; MIME: 'image/vnd.dwg'), (Ext: '.svf'; MIME: 'image/x-dwg'), (Ext: '.svr'; MIME: 'application/x-world'), (Ext: '.svr'; MIME: 'x-world/x-svr'), (Ext: '.swf'; MIME: 'application/x-shockwave-flash'), (Ext: '.t'; MIME: 'application/x-troff'), (Ext: '.talk'; MIME: 'text/x-speech'), (Ext: '.tar'; MIME: 'application/x-tar'), (Ext: '.tbk'; MIME: 'application/toolbook'), (Ext: '.tbk'; MIME: 'application/x-tbook'), (Ext: '.tcl'; MIME: 'application/x-tcl'), (Ext: '.tcl'; MIME: 'text/x-script.tcl'), (Ext: '.tcsh'; MIME: 'text/x-script.tcsh'), (Ext: '.tex'; MIME: 'application/x-tex'), (Ext: '.texi'; MIME: 'application/x-texinfo'), (Ext: '.texinfo'; MIME: 'application/x-texinfo'), (Ext: '.text'; MIME: 'application/plain'), (Ext: '.text'; MIME: 'text/plain'), (Ext: '.tgz'; MIME: 'application/gnutar'), (Ext: '.tgz'; MIME: 'application/x-compressed'), (Ext: '.tif'; MIME: 'image/tiff'), (Ext: '.tif'; MIME: 'image/x-tiff'), (Ext: '.tiff'; MIME: 'image/tiff'), (Ext: '.tiff'; MIME: 'image/x-tiff'), (Ext: '.tr'; MIME: 'application/x-troff'), (Ext: '.tsi'; MIME: 'audio/tsp-audio'), (Ext: '.tsp'; MIME: 'application/dsptype'), (Ext: '.tsp'; MIME: 'audio/tsplayer'), (Ext: '.tsv'; MIME: 'text/tab-separated-values'), (Ext: '.turbot'; MIME: 'image/florian'), (Ext: '.txt'; MIME: 'text/plain'), (Ext: '.uil'; MIME: 'text/x-uil'), (Ext: '.uni'; MIME: 'text/uri-list'), (Ext: '.unis'; MIME: 'text/uri-list'), (Ext: '.unv'; MIME: 'application/i-deas'), (Ext: '.uri'; MIME: 'text/uri-list'), (Ext: '.uris'; MIME: 'text/uri-list'), (Ext: '.ustar'; MIME: 'application/x-ustar'), (Ext: '.ustar'; MIME: 'multipart/x-ustar'), (Ext: '.uu'; MIME: 'application/octet-stream'), (Ext: '.uu'; MIME: 'text/x-uuencode'), (Ext: '.uue'; MIME: 'text/x-uuencode'), (Ext: '.vcd'; MIME: 'application/x-cdlink'), (Ext: '.vcs'; MIME: 'text/x-vcalendar'), (Ext: '.vda'; MIME: 'application/vda'), (Ext: '.vdo'; MIME: 'video/vdo'), (Ext: '.vew'; MIME: 'application/groupwise'), (Ext: '.viv'; MIME: 'video/vivo'), (Ext: '.viv'; MIME: 'video/vnd.vivo'), (Ext: '.vivo'; MIME: 'video/vivo'), (Ext: '.vivo'; MIME: 'video/vnd.vivo'), (Ext: '.vmd'; MIME: 'application/vocaltec-media-desc'), (Ext: '.vmf'; MIME: 'application/vocaltec-media-file'), (Ext: '.voc'; MIME: 'audio/voc'), (Ext: '.voc'; MIME: 'audio/x-voc'), (Ext: '.vos'; MIME: 'video/vosaic'), (Ext: '.vox'; MIME: 'audio/voxware'), (Ext: '.vqe'; MIME: 'audio/x-twinvq-plugin'), (Ext: '.vqf'; MIME: 'audio/x-twinvq'), (Ext: '.vql'; MIME: 'audio/x-twinvq-plugin'), (Ext: '.vrml'; MIME: 'application/x-vrml'), (Ext: '.vrml'; MIME: 'model/vrml'), (Ext: '.vrml'; MIME: 'x-world/x-vrml'), (Ext: '.vrt'; MIME: 'x-world/x-vrt'), (Ext: '.vsd'; MIME: 'application/x-visio'), (Ext: '.vst'; MIME: 'application/x-visio'), (Ext: '.vsw'; MIME: 'application/x-visio'), (Ext: '.w60'; MIME: 'application/wordperfect6.0'), (Ext: '.w61'; MIME: 'application/wordperfect6.1'), (Ext: '.w6w'; MIME: 'application/msword'), (Ext: '.wav'; MIME: 'audio/wav'), (Ext: '.wav'; MIME: 'audio/x-wav'), (Ext: '.wb1'; MIME: 'application/x-qpro'), (Ext: '.wbmp'; MIME: 'image/vnd.wap.wbmp'), (Ext: '.web'; MIME: 'application/vnd.xara'), (Ext: '.wiz'; MIME: 'application/msword'), (Ext: '.wk1'; MIME: 'application/x-123'), (Ext: '.wmf'; MIME: 'windows/metafile'), (Ext: '.wml'; MIME: 'text/vnd.wap.wml'), (Ext: '.wmlc'; MIME: 'application/vnd.wap.wmlc'), (Ext: '.wmls'; MIME: 'text/vnd.wap.wmlscript'), (Ext: '.wmlsc'; MIME: 'application/vnd.wap.wmlscriptc'), (Ext: '.word'; MIME: 'application/msword'), (Ext: '.wp'; MIME: 'application/wordperfect'), (Ext: '.wp5'; MIME: 'application/wordperfect'), (Ext: '.wp5'; MIME: 'application/wordperfect6.0'), (Ext: '.wp6'; MIME: 'application/wordperfect'), (Ext: '.wpd'; MIME: 'application/wordperfect'), (Ext: '.wpd'; MIME: 'application/x-wpwin'), (Ext: '.wq1'; MIME: 'application/x-lotus'), (Ext: '.wri'; MIME: 'application/mswrite'), (Ext: '.wri'; MIME: 'application/x-wri'), (Ext: '.wrl'; MIME: 'application/x-world'), (Ext: '.wrl'; MIME: 'model/vrml'), (Ext: '.wrl'; MIME: 'x-world/x-vrml'), (Ext: '.wrz'; MIME: 'model/vrml'), (Ext: '.wrz'; MIME: 'x-world/x-vrml'), (Ext: '.wsc'; MIME: 'text/scriplet'), (Ext: '.wsrc'; MIME: 'application/x-wais-source'), (Ext: '.wtk'; MIME: 'application/x-wintalk'), (Ext: '.xbm'; MIME: 'image/x-xbitmap'), (Ext: '.xbm'; MIME: 'image/x-xbm'), (Ext: '.xbm'; MIME: 'image/xbm'), (Ext: '.xdr'; MIME: 'video/x-amt-demorun'), (Ext: '.xgz'; MIME: 'xgl/drawing'), (Ext: '.xif'; MIME: 'image/vnd.xiff'), (Ext: '.xl'; MIME: 'application/excel'), (Ext: '.xla'; MIME: 'application/excel'), (Ext: '.xla'; MIME: 'application/x-excel'), (Ext: '.xla'; MIME: 'application/x-msexcel'), (Ext: '.xlb'; MIME: 'application/excel'), (Ext: '.xlb'; MIME: 'application/vnd.ms-excel'), (Ext: '.xlb'; MIME: 'application/x-excel'), (Ext: '.xlc'; MIME: 'application/excel'), (Ext: '.xlc'; MIME: 'application/vnd.ms-excel'), (Ext: '.xlc'; MIME: 'application/x-excel'), (Ext: '.xld'; MIME: 'application/excel'), (Ext: '.xld'; MIME: 'application/x-excel'), (Ext: '.xlk'; MIME: 'application/excel'), (Ext: '.xlk'; MIME: 'application/x-excel'), (Ext: '.xll'; MIME: 'application/excel'), (Ext: '.xll'; MIME: 'application/vnd.ms-excel'), (Ext: '.xll'; MIME: 'application/x-excel'), (Ext: '.xlm'; MIME: 'application/excel'), (Ext: '.xlm'; MIME: 'application/vnd.ms-excel'), (Ext: '.xlm'; MIME: 'application/x-excel'), (Ext: '.xls'; MIME: 'application/excel'), (Ext: '.xls'; MIME: 'application/vnd.ms-excel'), (Ext: '.xls'; MIME: 'application/x-excel'), (Ext: '.xls'; MIME: 'application/x-msexcel'), (Ext: '.xlt'; MIME: 'application/excel'), (Ext: '.xlt'; MIME: 'application/x-excel'), (Ext: '.xlv'; MIME: 'application/excel'), (Ext: '.xlv'; MIME: 'application/x-excel'), (Ext: '.xlw'; MIME: 'application/excel'), (Ext: '.xlw'; MIME: 'application/vnd.ms-excel'), (Ext: '.xlw'; MIME: 'application/x-excel'), (Ext: '.xlw'; MIME: 'application/x-msexcel'), (Ext: '.xm'; MIME: 'audio/xm'), (Ext: '.xml'; MIME: 'application/xml'), (Ext: '.xml'; MIME: 'text/xml'), (Ext: '.xmz'; MIME: 'xgl/movie'), (Ext: '.xpix'; MIME: 'application/x-vnd.ls-xpix'), (Ext: '.xpm'; MIME: 'image/x-xpixmap'), (Ext: '.xpm'; MIME: 'image/xpm'), (Ext: '.x-png'; MIME: 'image/png'), (Ext: '.xsr'; MIME: 'video/x-amt-showrun'), (Ext: '.xwd'; MIME: 'image/x-xwd'), (Ext: '.xwd'; MIME: 'image/x-xwindowdump'), (Ext: '.xyz'; MIME: 'chemical/x-pdb'), (Ext: '.z'; MIME: 'application/x-compress'), (Ext: '.z'; MIME: 'application/x-compressed'), (Ext: '.zip'; MIME: 'application/x-compressed'), (Ext: '.zip'; MIME: 'application/x-zip-compressed'), (Ext: '.zip'; MIME: 'application/zip'), (Ext: '.zip'; MIME: 'multipart/x-zip'), (Ext: '.zoo'; MIME: 'application/octet-stream'), (Ext: '.zsh'; MIME: 'text/x-script.zsh')); var i: Integer; begin Result := 'text/plain'; FileExt := AnsiLowerCase(FileExt); for i := Low(FileTypes) to High(FileTypes) do if FileTypes[i].Ext = FileExt then begin Result := FileTypes[i].MIME; Exit; end; end; [add2] wie sieht deine .RC denn aus?
Code:
STRINGTABLE
BEGIN 101, ".3dm x-world/x-3dmf" ... 742, ".zsh text/x-script.zsh" END
Neuste Erkenntnis:
Seit Pos einen dritten Parameter hat, wird PoSex im Delphi viel seltener praktiziert. |
Zitat |
Registriert seit: 7. Feb 2008 12 Beiträge |
#3
Hi.
Danke für Deine Bemühungen! Hast Dir ja sogar Arbeit gemacht Ich Dummkopf habe in dem Wirrwarr den Ausdruck STRINGTABLE total vergessen >_<! Aber ich nutze vllt. trotzdem die von Dir angepasste Funktion, dann hab ich alles übersichtlich an einer Stelle. |
Zitat |
Registriert seit: 11. Okt 2003 Ort: Elbflorenz 44.063 Beiträge Delphi 12 Athens |
#4
viel Arbeit war des eigentlich garnicht
- die Funktion selber ist in ein paar Sekunden umgeschrieben - die Konstante ... da ein bissl mit Notepade die Namen und Klammern eingefügt/ersetzt - mit Excel die IDs vorne entfernt - und das alles so schön untereinander ist ... ch mag langsam diese Blockmarkierung der IDE
Neuste Erkenntnis:
Seit Pos einen dritten Parameter hat, wird PoSex im Delphi viel seltener praktiziert. |
Zitat |
Registriert seit: 8. Mai 2005 Ort: Sondershausen 4.274 Beiträge Delphi 6 Personal |
#5
Zitat:
Aber ich nutze vllt. trotzdem die von Dir angepasste Funktion, dann hab ich alles übersichtlich an einer Stelle.
Als Bonus hört die Rumwurschtelei des Programms in der Resource auf, der gezeigte Quellcode ist für mich genauso grausam wie dieser:
Delphi-Quellcode:
procedure TForm1.FormPaint(Sender: TObject);
begin Image1.Picture.LoadFromfile('C:\XYZ.BMP') end;
Matti
|
Zitat |
Registriert seit: 11. Okt 2003 Ort: Elbflorenz 44.063 Beiträge Delphi 12 Athens |
#6
bei das rumgewurschtel in den Resourcen ist garnicht so schlimm, denn LoadString ist nicht direkt die WinAPI,
sondern beim Programmstart der Anwendung werden alle so verwendeten Strings der Resourcen gesucht und in den RAM vorgeladen ... danach wird nur noch "schnell" aus dem "Cache" geladen halt nee, das war bei der Verwendung von ResourceString's
Neuste Erkenntnis:
Seit Pos einen dritten Parameter hat, wird PoSex im Delphi viel seltener praktiziert. |
Zitat |
Ansicht |
Linear-Darstellung |
Zur Hybrid-Darstellung wechseln |
Zur Baum-Darstellung wechseln |
ForumregelnEs ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus. Trackbacks are an
Pingbacks are an
Refbacks are aus
|
|
Nützliche Links |
Heutige Beiträge |
Sitemap |
Suchen |
Code-Library |
Wer ist online |
Alle Foren als gelesen markieren |
Gehe zu... |
LinkBack |
LinkBack URL |
About LinkBacks |