نحوه فراخواني تابه در دلفي و توضيح پارامتر رو من ميخوام
Printable View
نحوه فراخواني تابه در دلفي و توضيح پارامتر رو من ميخوام
سلام
شما بعد از 564 تا پست هنوز نميدونيد كه چطور سوال بپرسيد؟! معمولا هم سوالهاي شما يك خطي و كلي است، اگر انتظار داريد جواب مناسبي دريافت كنيد بهتر است كمي وقت بگذاريد و سوالات خود را بصورت مشخص و واضح مطرح كنيد.
حالا چرا مي زنيد
من گفتم مثلا يه تابع بنام WinExec نحوه فراخونيش تو دلفي رو ميخوام
function WinExec (Parameter1,Parameter2,ParameterX):X data type;x
سلامنقل قول:
توي پست اولتون صحبتي از WinExec نبود!
مثال :کد:The WinExec function runs the specified application.
This function is provided for compatibility with earlier versions of Windows. For Win32-based applications, use the CreateProcess function.
UINT WinExec(
LPCSTR lpCmdLine, // address of command line
UINT uCmdShow // window style for new application
);
Parameters
lpCmdLine
Points to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, Windows searches for the executable file in this sequence:
1. The directory from which the application loaded.
2. The current directory.
3. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
4. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
5. The directories listed in the PATH environment variable.
uCmdShow
Specifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of the ShowWindow function. For a non-Windows - based application, the PIF file, if any, for the application determines the window state.
Return Values
If the function succeeds, the return value is greater than 31.
If the function fails, the return value is one of the following error values:
Value Meaning
0 The system is out of memory or resources.
ERROR_BAD_FORMAT The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
کد:WinExec(PChar('C:\windows\notepad.exe'), SW_SHOWNORMAL)
خوب مثلا شما اين اطلاعات رو از کجا ميگيري؟؟؟ تا منم بقيه توابعي رو که ميخوام پيدا کنم
سلامنقل قول:
از راهنماي دلفي!
اولين جايي كه بايد دنبال راهنما باشيد خود دلفي است.
ولي خوب به اين شکلي که شما نوشتي نبود که:
کد:WinExec(PChar('C:\windows\notepad.exe'), SW_SHOWNORMAL)
Help>Windows SDK :46:نقل قول:
سلام
ميشه بگيد دقيقاً ميخواي چه كار كني با api تا اگه تونستم دستورشو طرز استفادشو واست بنويسم
مثلا تابع AVIFileOpen رو به روش دلفي ميخوام