⑴ C璇瑷鍑芥暟璋幂敤鏂瑰纺镄勫尯鍒
阃氩父鍦ㄤ娇鐢╒C杩涜屽嚱鏁板畾涔夋椂浼氭寚瀹氲ュ嚱鏁拌皟鐢ㄦ柟寮忥纴璇稿傦细
int __stdcall max锛坕nt a, int b锛
{
return ab?a:b;
}
int __cdecl min锛坕nt a, int b锛
{
return ab?a:b;
}
bool __fastcall equal锛坕nt a, int b锛
{
return a=b?true:false;
}
棣栧厛锛岃╂垜浠𨱒ュ垎涓绫伙纴璋幂敤鏂规硶鍒嗕负涓ゅぇ绫诲彟锷犱竴涓杈幂壒娈婄殑__thiscall.
绗涓绫伙细__stdcall绫 鍒钖嶏细WINAPI,CALLBACK,PASCAL銆傝ョ被鐗圭偣鏄锛氢富璋冨嚱鏁拌礋璐e弬鏁板叆镙堬纴鐢卞嚱鏁版湰韬璐熻矗镙堢殑鎭㈠嶃
绗浜岀被锛歘_cdecl绫 鍒钖嶏细C/C++涓榛樿よ皟鐢ㄦ柟寮忥纴鑻ヤ綘瀹氢箟鍑芥暟链鎸囧畾鍑芥暟璋幂敤绾﹀畾锛圕alling Conventions锛夛纴渚嫔傚湪VC6涓涓嬮溃涓や釜鍑芥暟镄勮皟鐢ㄧ害瀹氭槸绛変环镄勶细
int max锛坕nt a, int b锛
{
return ab?a:b;
}
int __cdecl min锛坕nt a, int b锛
{
return ab?a:b;
}
璇ョ被璋幂敤绾﹀畾镄勭壒镣规槸锛氱敱涓昏皟鍑芥暟璐熻矗鍙傛暟鍏ユ爤锛屽苟鐢变富璋冨嚱鏁拌礋璐g嚎镄勬仮澶嶃
绗涓夌被锛歘_thiscall 璇ョ被姣旇缉鐗规畩锛屽彧鐢ㄤ簬绫绘垚锻桦嚱鏁拌皟鐢锛屼綘鐢氲呖涓嶈兘寮哄埗鎸囧畾杩欎釜鍑芥暟璋幂敤绾﹀畾銆傚畠鏄鐢盋/C++缂栬疟鍣ㄨ嚜锷ㄦ坊锷犵殑銆傚湪C/C++涓绫绘垚锻桦嚱鏁颁细榛樿や紶鍏ヤ竴涓猼his鎸囬拡锛屽逛簬姝わ纴鍦ㄩ粯鍏ユ儏鍐典笅锛孋/C++涓绫绘垚锻桦嚱鏁伴氲繃姝ょ被璋幂敤绾﹀畾𨱒ユ寚瀹歵his鎸囬拡銆
鎺ョ潃浠嬬粛涓涓媉_thiscall锛宊_thiscall鏄鍏充簬绫荤殑涓绉嶈皟鐢ㄦ柟寮忋
瀹冧笌鍏朵粬璋幂敤鏂瑰纺镄勬渶澶у尯鍒鏄锛
__thiscall瀵规疮涓鍑芥暟閮藉炲姞浜嗕竴涓绫绘寚阍埚弬鏁
class aa
{
void bb锛坕nt cc锛夛绂
};
瀹为檯涓奲b镄勫嚱鏁板师褰㈡槸void bb锛坅a this, int cc锛夛绂
__cdecl镄勮皟鐢ㄦ柟寮忎粙缁嶏细 C鍜孋++缂虹渷璋幂敤鏂瑰纺
渚嫔瓙锛
void Input锛 int m,int n锛夛绂/*鐩稿綋浜巚oid __cdecl Input锛坕nt m,int n锛夛绂*/
浠ヤ笅鏄鐩稿簲镄勬眹缂栦唬镰侊细
00401068 lea eax,[ebp-8] ;鍙朳ebp-8]鍦板潃锛坋bp-8锛夛纴瀛桦埌eax
0040106B push eax ;铹跺悗铡嬫爤
0040106C lea ecx,[ebp-4] ;鍙朳ebp-4]鍦板潃锛坋bp-4锛夛纴瀛桦埌ecx
0040106F push ecx ;铹跺悗铡嬫爤
00401070 call @ILT+5锛圛nput锛 锛0040100a锛夛绂铹跺悗璋幂敤Input鍑芥暟
00401075 add esp,8 ;鎭㈠嶆爤
浠庝互涓婅皟鐢↖nput鍑芥暟镄勮繃绋嫔彲浠ョ湅鍑猴细鍦ㄨ皟鐢ㄦゅ嚱鏁颁箣鍓嶏纴棣栧厛铡嬫爤ebp-8,铹跺悗铡嬫爤ebp-4,铹跺悗璋幂敤鍑芥暟Input,链钖嶪nput鍑芥暟璋幂敤缁撴潫钖庯纴鍒╃敤esp+8鎭㈠嶆爤銆傜敱姝ゅ彲瑙侊纴鍦–璇瑷璋幂敤涓榛樿ょ殑鍑芥暟淇楗癣cdecl锛岀敱涓昏皟鐢ㄥ嚱鏁拌繘琛屽弬鏁板帇镙埚苟涓旀仮澶嶅爢镙堛
涓嬮溃鐪嬩竴涓嬶细鍦板潃ebp-8鍜宔bp-4鏄浠涔堬纻 鍦╒C镄刅IEW-debug windows-Registers,鏄剧ず瀵勫瓨鍣ㄥ彉閲忓硷纴铹跺悗鍦ㄩ塪ebug windows-Memory,杈揿叆ebp-8镄勫煎拰ebp-4镄勫硷纸鎴栫洿鎺ヨ緭鍏ebp-8鍜-4锛夛纴鐪嬩竴涓嬭繖涓や釜鍦板潃瀹为檯瀛桦偍镄勬槸浠涔埚硷纴瀹为檯涓婃槸鍙橀噺"n "镄勫湴鍧锛坋bp-8锛夛纴m镄勫湴鍧锛坋bp-4锛夈
鐢辨ゅ彲浠ョ湅鍑猴细鍦ㄤ富璋幂敤鍑芥暟涓杩涜屽疄鍙傜殑铡嬫爤骞朵笖椤哄簭鏄浠庡彸鍒板乏銆傚彟澶栵纴鐢变簬瀹炲弬鏄鐩稿簲镄勫彉閲忕殑寮旷敤锛屼篃璇佹槑瀹为檯涓婂紩鐢ㄤ紶阃掔殑鏄鍙橀噺镄勫湴鍧锛堢被浼兼寚阍堬级銆
镐荤粨锛氩湪C鎴朇++璇瑷璋幂敤涓榛樿ょ殑鍑芥暟淇楗癣cdecl锛岀敱涓昏皟鐢ㄥ嚱鏁拌繘琛屽弬鏁板帇镙埚苟涓旀仮澶嶅爢镙堬纴瀹炲弬镄勫帇镙堥‘搴忔槸浠庡彸鍒板乏锛屾渶钖庣敱涓昏皟鍑芥暟杩涜屽爢镙堟仮澶嶃傜敱浜庝富璋幂敤鍑芥暟绠$悊鍫嗘爤锛屾墍浠ュ彲浠ュ疄鐜板彉鍙傚嚱鏁般傚彟澶栵纴锻藉悕淇楗版柟娉曟槸鍦ㄥ嚱鏁板墠锷犱竴涓涓嫔垝 绾匡纸_锛夈
_stdcall璋幂敤绾﹀畾浠嬬粛锛氩疄闄呬笂灏辨槸PASCAL锛孋ALLBACK,WINAPI
渚嫔瓙锛
void WINAPI Input锛 int m,int n锛夛绂
鐪嬩竴涓嬬浉搴旇皟鐢ㄧ殑姹囩紪浠g爜锛
00401068 lea eax,[ebp-8]
0040106B push eax
0040106C lea ecx,[ebp-4]
0040106F push ecx
00401070 call @ILT+5锛圛nput锛 锛0040100a锛
浠庝互涓婅皟鐢↖nput鍑芥暟镄勮繃绋嫔彲浠ョ湅鍑猴细鍦ㄨ皟鐢ㄦゅ嚱鏁颁箣鍓嶏纴棣栧厛铡嬫爤ebp-8,铹跺悗铡嬫爤ebp-4,铹跺悗璋幂敤鍑芥暟Input,鍦ㄨ皟鐢ㄥ嚱鏁癐nput涔嫔悗锛屾病链夌浉搴旂殑鍫嗘爤鎭㈠嶅伐浣滐纸涓哄叾瀹幂殑鍑芥暟璋幂敤锛屾墍浠ユ垜娌℃湁鍒楀嚭锛変笅闱㈠啀鍒楀嚭Input鍑芥暟链韬镄勬眹缂栦唬镰侊细锛埚疄闄呮ゅ嚱鏁颁笉澶э纴浣嗗仛姹囩紪渚嫔瓙杩樻槸澶т简浜涳纴澶у跺彲浠ュ彧鐪嫔墠鍜屽悗锛屼腑闂翠唬镰佷笌姝や緥瀛愭棤鍏筹级
39: void WINAPI Input锛 int m,int n锛
40: {
00401110 push ebp
00401111 mov ebp,esp
00401113 sub esp,48h
00401116 push ebx
00401117 push esi
00401118 push edi
00401119 lea edi,[ebp-48h]
0040111C mov ecx,12h
00401121 mov eax,0CCCCCCCCh
00401126 rep stos dword ptr [edi]
41: int s,i;
42:
43: while锛1锛
00401128 mov eax,1
0040112D test eax,eax
0040112F je Input+0C1h 锛004011d1锛
44: {
45: printf锛"Please input the first number m:"锛夛绂
00401135 push offset string "Please input the first number m" 锛004260b8锛
0040113A call printf 锛00401530锛
0040113F add esp,4
46: scanf锛"%d",m锛夛绂
00401142 mov ecx,dword ptr [ebp+8]
00401145 push ecx
00401146 push offset string "%d" 锛004260b4锛
0040114B call scanf 锛004015f0锛
00401150 add esp,8
47:
48: if 锛 m= s 锛
004011B3 mov eax,dword ptr [ebp+8]
004011B6 mov ecx,dword ptr [eax]
004011B8 cmp ecx,dword ptr [ebp-4]
004011BB jl Input+0AFh 锛004011bf锛
57: break;
004011BD jmp Input+0C1h 锛004011d1锛
58: else
59: printf锛" m
n*锛坣+1锛/2,Please input again!"锛夛绂
004011BF push offset string " m
n*锛坣+1锛/2,Please input agai" 锛00426060锛
004011C4 call printf 锛00401530锛
004011C9 add esp,4
60: }
004011CC jmp Input+18h 锛00401128锛
61:
62: }
004011D1 pop edi
004011D2 pop esi
004011D3 pop ebx
004011D4 add esp,48h
004011D7 cmp ebp,esp
004011D9 call __chkesp 锛004015b0锛
004011DE mov esp,ebp
004011E0 pop ebp
004011E1 ret 8
涔嫔悗锛屾垜浠鐪嫔埌鍦ㄥ嚱鏁版汤灏鹃儴鍒嗭纴链塺et 8锛屾槑鏄炬槸鎭㈠嶅爢镙堬纴鐢变簬鍦32浣岰++涓锛屽彉閲忓湴鍧涓4涓瀛楄妭锛坕nt涔熶负4涓瀛楄妭锛夛纴镓浠ュ脊镙堜袱涓鍦板潃鍗8涓瀛楄妭銆傜敱姝ゅ彲浠ョ湅鍑猴细鍦ㄤ富璋幂敤鍑芥暟涓璐熻矗铡嬫爤锛屽湪琚璋幂敤鍑芥暟涓璐熻矗鎭㈠嶅爢镙堛傚洜姝や笉鑳藉疄鐜板彉鍙傚嚱鏁帮纴锲犱负琚璋冨嚱鏁颁笉鑳戒簨鍏堢煡阆揿脊镙堟暟閲忥纴浣嗗湪涓昏皟鍑芥暟涓鏄鍙浠ュ仛鍒扮殑锛屽洜涓哄弬鏁版暟閲忕敱涓昏皟鍑芥暟纭瀹氥
涓嬮溃鍐岖湅涓涓嬶纴ebp-8鍜宔bp-4杩欎袱涓鍦板潃瀹为檯瀛桦偍镄勬槸浠涔埚硷纴ebp-8鍦板潃瀛桦偍镄勬槸n 镄勫硷纴ebp -4瀛桦偍镄勬槸m镄勫笺傝存槑涔熸槸浠庡彸鍒板乏铡嬫爤锛岃繘琛屽弬鏁颁紶阃掋
镐荤粨锛歘stdcall鍦ㄤ富璋幂敤鍑芥暟涓璐熻矗铡嬫爤锛屽湪琚璋幂敤鍑芥暟涓璐熻矗寮瑰嚭鍫嗘爤涓镄勫弬鏁帮纴骞朵笖璐熻矗鎭㈠嶅爢镙堛傚洜姝や笉鑳藉疄鐜板彉鍙傚嚱鏁帮纴鍙傛暟浼犻掓槸浠庡彸鍒板乏銆傚彟澶栵纴锻藉悕淇楗版柟娉曟槸鍦ㄥ嚱鏁板墠锷犱竴涓涓嫔垝绾匡纸_锛夛纴鍦ㄥ嚱鏁板悕钖庢湁绗﹀彿锛园锛夛纴鍦ˊ钖庨溃绱ц窡鍙傛暟鍒楄〃涓镄勫弬鏁版墍鍗犲瓧鑺傛暟锛10杩涘埗锛夛纴濡傦细void Input锛坕nt m,int n锛夛纴琚淇楗版垚锛歘Input@8 瀵逛簬澶у氭暟api鍑芥暟浠ュ强绐楀彛娑堟伅澶勭悊鍑芥暟镄嗙敤CALLBACK,镓浠ヨ皟鐢ㄥ墠锛屼富璋冨嚱鏁颁细鍏埚帇镙堬纴铹跺悗api鍑芥暟镊宸辨仮澶嶅爢镙堛
濡傦细
push edx
push edi
push eax
push ebx
call getdlgitemtexta
链钖庯纴鍦⊿DK涓杈揿嚭API鍑芥暟镄勬椂鍊欙纴缁忓父浼氩埄鐢╓INAPI瀵瑰嚱鏁拌繘琛岀害瀹氾纴WINAPI鍦╓IN32涓锛屽畠琚瀹氢箟涓篲_stdcall 鍑芥暟璋幂敤绾﹀畾链夊氱嶏纴杩欓噷绠鍗曡翠竴涓嬶细
1銆乢_stdcall璋幂敤绾﹀畾鐩稿綋浜16浣嶅姩镐佸簱涓缁忓父浣跨敤镄凯ASCAL璋幂敤绾﹀畾銆傚湪32浣岖殑VC++5.0涓璓ASCAL璋幂敤绾﹀畾涓嶅啀琚鏀鎸侊纸瀹为檯涓婂畠宸茶瀹氢箟涓篲_stdcall銆傞櫎浜哶_pascal 澶栵纴__fortran鍜宊_syscall涔熶笉琚鏀鎸侊级锛屽彇钥屼唬涔嬬殑鏄痏_stdcall璋幂敤绾﹀畾銆备袱钥呭疄璐ㄤ笂鏄涓镊寸殑锛屽嵆鍑芥暟镄勫弬鏁拌嚜鍙冲悜宸﹂氲繃镙堜紶阃掞纴琚璋幂敤镄勫嚱鏁板湪杩斿洖鍓嶆竻鐞嗕紶阃佸弬鏁扮殑鍐呭瓨镙堬纴浣嗕笉钖岀殑鏄鍑芥暟钖岖殑淇楗伴儴鍒嗭纸鍏充簬鍑芥暟钖岖殑淇楗伴儴鍒嗗湪钖庨溃灏呜︾粏璇存槑锛夈
_stdcall鏄疨ascal绋嫔簭镄勭己鐪佽皟鐢ㄦ柟寮忥纴阃氩父鐢ㄤ簬Win32 Api涓锛屽嚱鏁伴噰鐢ㄤ粠鍙冲埌宸︾殑 铡嬫爤鏂瑰纺锛岃嚜宸卞湪阃鍑烘椂娓呯┖鍫嗘爤銆俈C灏嗗嚱鏁扮紪璇戝悗浼氩湪鍑芥暟钖嶅墠闱㈠姞涓娄笅鍒掔嚎鍓岖紑锛屽湪鍑芥暟钖嶅悗锷犱笂"@"鍜屽弬鏁扮殑瀛楄妭鏁般
2銆丆璋幂敤绾﹀畾锛埚嵆鐢╛_cdecl鍏抽敭瀛楄存槑锛夋寜浠庡彸镊冲乏镄勯‘搴忓帇鍙傛暟鍏ユ爤锛岀敱璋幂敤钥呮妸鍙傛暟寮瑰嚭镙堛傚逛簬浼犻佸弬鏁扮殑鍐呭瓨镙堟槸鐢辫皟鐢ㄨ呮潵缁存姢镄勶纸姝e洜涓哄傛わ纴瀹炵幇鍙鍙桦弬鏁扮殑鍑芥暟鍙鑳戒娇鐢ㄨヨ皟鐢ㄧ害瀹氾级銆傚彟澶栵纴鍦ㄥ嚱鏁板悕淇楗扮害瀹氭柟闱涔熸湁镓涓嶅悓銆
_cdecl鏄疌鍜孋锛嬶纭绋嫔簭镄勭己鐪佽皟鐢ㄦ柟寮忋傛疮涓涓璋幂敤瀹幂殑鍑芥暟閮藉寘钖娓呯┖鍫嗘爤镄勪唬镰侊纴镓浠ヤ骇鐢熺殑鍙镓ц屾枃浠跺ぇ灏忎细姣旇皟鐢╛stdcall鍑芥暟镄勫ぇ銆傚嚱鏁伴噰鐢ㄤ粠鍙冲埌宸︾殑铡嬫爤鏂瑰纺銆俈C灏嗗嚱鏁扮紪璇戝悗浼氩湪鍑芥暟钖嶅墠闱㈠姞涓娄笅鍒掔嚎鍓岖紑銆傛槸MFC缂虹渷璋幂敤绾﹀畾銆
3銆乢_fastcall璋幂敤绾﹀畾鏄钬滀汉钬濆傚叾钖嶏纴瀹幂殑涓昏佺壒镣瑰氨鏄蹇锛屽洜涓哄畠鏄阃氲繃瀵勫瓨鍣ㄦ潵浼犻佸弬鏁扮殑锛埚疄闄呬笂锛屽畠鐢‥CX鍜孍DX浼犻佸墠涓や釜鍙屽瓧锛图WORD锛夋垨镟村皬镄勫弬鏁帮纴鍓╀笅镄勫弬鏁颁粛镞ц嚜鍙冲悜宸﹀帇镙堜紶阃侊纴琚璋幂敤镄勫嚱鏁板湪杩斿洖鍓嶆竻鐞嗕紶阃佸弬鏁扮殑鍐呭瓨镙堬级锛屽湪鍑芥暟钖崭慨楗扮害瀹氭柟闱锛屽畠鍜屽墠涓よ呭潎涓嶅悓銆
_fastcall鏂瑰纺镄勫嚱鏁伴噰鐢ㄥ瘎瀛桦櫒浼犻掑弬鏁帮纴VC灏嗗嚱鏁扮紪璇戝悗浼氩湪鍑芥暟钖嶅墠闱㈠姞涓"@"鍓岖紑锛屽湪鍑芥暟钖嶅悗锷犱笂"@"鍜屽弬鏁扮殑瀛楄妭鏁般
4銆乼hiscall浠呬粎搴旂敤浜庘淐++钬濇垚锻桦嚱鏁般伥his鎸囬拡瀛樻斁浜嶤X瀵勫瓨鍣锛屽弬鏁颁粠鍙冲埌宸﹀帇銆伥hiscall涓嶆槸鍏抽敭璇嶏纴锲犳や笉鑳借绋嫔簭锻樻寚瀹氥
5銆乶aked call閲囩敤1-4镄勮皟鐢ㄧ害瀹氭椂锛屽傛灉蹇呰佺殑璇濓纴杩涘叆鍑芥暟镞剁紪璇戝櫒浼氢骇鐢熶唬镰佹潵淇濆瓨ESI锛孍DI锛孍BX锛孍BP瀵勫瓨鍣锛岄鍑哄嚱鏁版椂鍒欎骇鐢熶唬镰佹仮澶嶈繖浜涘瘎瀛桦櫒镄勫唴瀹广俷aked call涓崭骇鐢熻繖镙风殑浠g爜銆俷aked call涓嶆槸绫诲瀷淇楗扮︼纴鏁呭繀椤诲拰_declspec鍏卞悓浣跨敤銆
⑵ 急求!我的电脑打不开PR cc,重装系统后打开了,但是一导入素材到轨道上就会弹出关闭程序怎么办
1、右键开始菜单进入程序和功能卸载有问题的PremiereCC软件。
2、下载安装“Registry Workshop”注册表清理软件。在搜索栏中键入“Premiere”搜索注册表中所有的项,全选所有项,右键删除“注册表中所有项”。
3、打开资源管理器(此电脑),在左上栏中键入“Premiere”,搜索C盘中所有Premiere CC的项,全选搜索到的文件和文件夹并删除。
4、重新安装PremiereCC。此后PremiereCC工作正常。