全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1595
推到 Plurk!
推到 Facebook!

捷徑產生方程式?

答題得分者是:RaynorPao
Eigen
初階會員


發表:19
回覆:36
積分:26
註冊:2002-12-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-12-19 12:29:05 IP:61.218.xxx.xxx 未訂閱
捷徑產生方程式? 請問一下,有人使用過這類的功能嗎? 目前我想寫個程式 link test.exe 然後就會產生 test.lnk link bcc.bat 然後就會產生 bcc.pif 有人操作過這類的 捷徑 function 嗎? 我有在 msdn上找到相關的 function PifMgr_OpenProperties PifMgr_GetProperties PifMgr_SetProperties 不過這只能在 2000 下使用 ,我用的是98 請指教 言身寸 言身寸
RaynorPao
版主


發表:139
回覆:3622
積分:7025
註冊:2002-08-12

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-12-19 12:39:44 IP:203.73.xxx.xxx 未訂閱
引言: 捷徑產生方程式? 請問一下,有人使用過這類的功能嗎? 目前我想寫個程式 link test.exe 然後就會產生 test.lnk link bcc.bat 然後就會產生 bcc.pif 有人操作過這類的 捷徑 function 嗎? 我有在 msdn上找到相關的 function PifMgr_OpenProperties PifMgr_GetProperties PifMgr_SetProperties 不過這只能在 2000 下使用 ,我用的是98 請指教 言身寸 言身寸
Eigen 你好: 請參考以下這篇文章
------
-- 若您已經得到滿意的答覆,請適時結案!! --
-- 欲知前世因,今生受者是;欲知來世果,今生做者是 --
-- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 --
Eigen
初階會員


發表:19
回覆:36
積分:26
註冊:2002-12-05

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-12-19 15:08:31 IP:61.218.xxx.xxx 未訂閱
言身寸 言身寸 了解了,非常感言身寸
Eigen
初階會員


發表:19
回覆:36
積分:26
註冊:2002-12-05

發送簡訊給我
#4 引用回覆 回覆 發表時間:2002-12-19 15:55:29 IP:61.218.xxx.xxx 未訂閱
有頭緒之後找起來就容易多了,這是我找到的相關文件, 土法練鋼法,大家看看吧 http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_11506978.html Title: PIF Files From: mgonyea Date: 10/10/2000 05:55AM PST Answer Grade: B Points: 10 What I would like to do is to have a program that generates PIF files on the fly. I will give you some background info. on this. There are a series of demo programs that we would like to distribute, and we'd like to have a main Win9x menu program that selects and installs certain components. What I would like to know is how to create a PIF file for DOS based programs (the program needs MS-DOS mode, so I'll need to set up parameters for the PIF as well) in Visual C . Basically once they have chosen to install a certain program, an icon would be already created for them on their desktop to run at any time with the appropriate shortcut options (e.g. run in dos mode, etc.) View Accepted Answer If this EE solution does not provide the information you are looking for, you can signup as a member and ask your specific question of our 125,000 experts for free. Question History Accepted Answer from nietod 10/10/2000 06:27AM PST The pif file format is documented on http://www.wotsit.org/search.asp I can't give you the exact link because fot he the way the site works. Just go to that site and enter "pif" in the search box and performa search. There will be 1 match. Download the docs found. (only about 1 k zipped). Comment from nietod 10/10/2000 06:31AM PST The docs are short enough that I can just paste them. PIF Format Intel byte order Information from File Format List 2.0 by Max Maischein. --------!-CONTACT_INFO---------------------- If you notice any mistakes or omissions, please let me know! It is only with YOUR help that the list can continue to grow. Please send all changes to me rather than distributing a modified version of the list. This file has been authored in the style of the INTERxxy.* file list by Ralf Brown, and uses almost the same format. Please read the file FILEFMTS.1ST before asking me any questions. You may find that they have already been addressed. Max Maischein Max Maischein, 2:244/1106.17 Max_Maischein@spam.fido.de corion@informatik.uni-frankfurt.de Corion on #coders@IRC --------!-DISCLAIMER------------------------ DISCLAIMER: THIS MATERIAL IS PROVIDED "AS IS". I verify the information contained in this list to the best of my ability, but I cannot be held responsible for any problems caused by use or misuse of the information, especially for those file formats foreign to the PC, like AMIGA or SUN file formats. If an information it is marked "guesswork" or undocumented, you should check it carefully to make sure your program will not break with an unexpected value (and please let me know whether or not it works the same way). Information marked with "???" is known to be incomplete or guesswork. Some file formats were not released by their creators, others are regarded as proprietary, which means that if your programs deal with them, you might be looking for trouble. I don't care about this. -------------------------------------------- The Program Information Files have stayed a long time with the PC. They origi- nated from IBMs Topview, were carried on by DoubleView and DesqView, and today they are used by Windows and Windows NT. The PIF files store additional information about executables that are foreign to the running multitasking system such as ressource usage, keyboard and mouse virtualization and hotkeys. The original (Topview) PIF had a size of 171h bytes, after that, there come the various extensions for the different operating environments. The different extensions are discussed in their own sections. OFFSET Count TYPE Description 0000h 1 byte reserved 0001h 1 byte Checksum 0002h 30 char Title for the window 0020h 1 word Maximum memory reserved for program 0022h 1 word Minimum memory reserved for program 0024h 63 char Path and filename of the program 0063h 1 byte 0 - Do not close window on exit other - Close window on exit 0064h 1 byte Default drive (0=A: ??) 0065h 64 char Default startup directory 00A5h 64 char Parameters for program 00E5h 1 byte Initial screen mode, 0 equals mode 3 ? 00E6h 1 byte Text pages to reserve for program 00E7h 1 byte First interrupt used by program 00E8h 1 byte Last interrupt used by program 00E9h 1 byte Rows on screen 00EAh 1 byte Columns on screen 00EBh 1 byte X position of window 00ECh 1 byte Y position of window 00EDh 1 word System memory ?? whatever 00EFh 64 char ?? Shared program path 012Fh 64 char ?? Shared program data file 016Fh 1 word Program flags EXTENSION:PIF,DVP OCCURENCES:PC PROGRAMS:Topview, DesqView, Windows REFERENCE:see DDJ #202, July 1993, QuarterDeck SDK SEE ALSO:Windows PIF, Windows NT PIF VALIDATION: Comment from nietod 10/10/2000 06:37AM PST If you have VC, you can also find some examples that create shortcuts. Look in the help contents under books Programming the Windows 95 Interface Part 2 Chapter 9 shortcuts. There is also an example in the VC help in article Q155303. (just search the help for the Q number). This example uses the fCreateShellLink() function in the STKIT432.DLL DLL. The example is in VB, but you can do this from C . Comment from AlexVirochovsky 10/10/2000 12:43PM PST Next is my code for generating PIF file for Dos (without ShellLink Interface) typedef struct tagPIFHEADER { BYTE reserved1; BYTE reserved2; char windowsTitile[30]; short maxMem; short minMem; char programFilename[63]; short msFlags; char startupDirectory[64]; unsigned short reserved[138]; }PIFHEADER; typedef struct tagPIFDATA { short memKBDesired; short memKBRequired; short backgroundPriority; short foregroundPriority; short emsKBLimit; short emsKBRequired; short xmsKBLimit; short xmsKBRequired; BYTE fFlags1; BYTE fFlags2; BYTE fFlags3; BYTE fFlags4; BYTE fFlags5; BYTE fFlags6; short reserved1; short keyScanCode; short appKeyFlags; BYTE reserved2[12]; char optionalParameters[64]; }PIFDATA; PIFHEADER pfH; PIFDATA pfD; FILE *fIn; //form Header memset(&pfH, 0,sizeof(pfH)); pfH.reserved2 = 0xF0; pfH.maxMem = 128; pfH.minMem = 128; memset(pfH.windowsTitile,' ',30); char *szT = "Test"; strncpy(pfH.windowsTitile, szT, strlen(szT)); memset(pfH.programFilename,' ',63); char *sz = "pkzip.exe"; strcpy(pfH.programFilename, sz); pfH.msFlags = 0x0010; memset(pfH.startupDirectory,' ',64); *pfH.startupDirectory = 0; //form Data memset(&pfD,0, sizeof(pfD)); pfD.memKBDesired = -1; pfD.memKBRequired = -1; pfD.backgroundPriority = 1; pfD.foregroundPriority = 1; memset(pfD.optionalParameters, ' ',63); sz = "c:\\zip\\shopwork.zip d:\\shop\\work\\*.*"; strcpy(pfD.optionalParameters, sz); fIn = fopen("my.pif", "wb"); write(fIn->fd,&pfH, sizeof(pfH)); write(fIn->fd,&pfD, sizeof(pfD)); fclose(fIn); ShellExecute(this->HWindow,"open", "my.pif",NULL, NULL,SW_NORMAL);
系統時間:2024-03-28 23:31:47
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!