Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.09.12;
Скачать: [xml.tar.bz2];

Вниз

Как обеспечить совместимость с разными Windows?   Найти похожие ветки 

 
Alexander   (2002-09-01 04:34) [0]

Есть в программе описание функции, которая присутствует только в Windows 2000/XP:

function QueryUsersOnEncryptedFile(Filename: PWideChar; users: Pointer): Cardinal;
stdcall; external advapi32 name "QueryUsersOnEncryptedFile";

и есть процедура, в которой она вызывается.

Как оформить код так, чтобы он компилился и работал для любых виндов (естественно, я эту функцию не буду вызывать в Windows 98)


 
Mike_Goblin   (2002-09-01 11:26) [1]

Нет ничего лучше как почитать хелп, а там написано:
When using operating system APIs or accessing areas of the operating system from an application, there is the possibility that the function, operation, or area may not be available on computers with different operating system versions.
To account for this possibility, you have a few options:

Specify in the application’s system requirements the versions of the operating system on which the application can run. It is the user’s responsibility to install and use the application only under compatible operating system versions.
Check the version of the operating system as the application is installed. If an incompatible version of the operating system is present, either halt the installation process or at least warn the installer of the problem.

Check the operating system version at runtime, just prior to executing an operation not applicable to all versions. If an incompatible version of the operating system is present, abort the process and alert the user. Alternately, provide different code to run dependent on different operating system versions. For example, some operations are performed differently on Windows 95/98 than on Windows NT/2000. Use the Windows API function GetVersionEx to determine the Windows version.


 
drpass   (2002-09-01 11:58) [2]

Мой перевод не совсем дословный, но по теме:
Пытайся загрузить ее не статически, а с помощью функций LoadLibrary/GetProcAddress. Если не получится, значит, это другая версия Windows.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2002.09.12;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.45 MB
Время: 0.006 c
4-35950
bobic
2002-07-19 11:07
2002.09.12
Программное переключение языка


4-35951
MJH
2002-07-19 19:24
2002.09.12
Хинты Win2k из трея


3-35629
Firsor1
2002-08-23 10:41
2002.09.12
не выбираются некоторые записи


4-35952
CAHbKA
2002-07-22 05:12
2002.09.12
Где лежит Winamp?


1-35713
Termik
2002-09-02 17:53
2002.09.12
Компонент для показа анимированных гифов





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский