ANTICHAT — форум по информационной безопасности, OSINT и технологиям
ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию.
Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club,
и теперь снова доступен на новом адресе —
forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.

13.03.2008, 18:39
|
|
Reservists Of Antichat - Level 6
Регистрация: 04.02.2007
Сообщений: 1,152
Провел на форуме: 3008839
Репутация:
1502
|
|
банально приходит в голову:
s1 = "0:\My Documents"
s2 = "0:\Мои документы"
for (char a = "c"; a < "z"; a++){
s1[0] = a;
s2[0] = a;
//проверяем существование директоии s1 и s2, если нашли то выходим...
}
__________________
Bedankt euch dafür bei euch selbst.
H_2(S^3/((z1, z2)~(exp(2pi*i/p)z1, exp(2pi*q*i/p)z2)))=Z/pZ
|
|
|

13.03.2008, 19:02
|
|
Познающий
Регистрация: 17.01.2008
Сообщений: 94
Провел на форуме: 314553
Репутация:
38
|
|
мне нада чтобы было универсально для всей винды
и как создать системный скрытый папку в Си
desTiny идея та хорошая но если у нево на двух директориях стоит винда то тагда что делать?
на виндах ниже ИТ работает ли функция GetWindowsDirectory()??
Последний раз редактировалось KSoniX; 13.03.2008 в 19:06..
|
|
|

13.03.2008, 19:28
|
|
Новичок
Регистрация: 27.01.2008
Сообщений: 13
Провел на форуме: 210819
Репутация:
26
|
|
Сообщение от KSoniX
на виндах ниже ИТ работает ли функция GetWindowsDirectory()??
ниже NT? да.(с 95 начиная).
Еще по твоей теме можешь посмоьреть это http://delphiworld.narod.ru/base/windows_name_spaces.html
|
|
|

13.03.2008, 20:13
|
|
Reservists Of Antichat - Level 6
Регистрация: 04.02.2007
Сообщений: 1,152
Провел на форуме: 3008839
Репутация:
1502
|
|
Сообщение от noobyara
ниже NT? да.(с 95 начиная).
Еще по твоей теме можешь посмоьреть это http://delphiworld.narod.ru/base/windows_name_spaces.html
Да? А Msdn говорит, что нет:
Requires Windows Vista, Windows XP, or Windows 2000 Professional.
http://msdn2.microsoft.com/en-us/lib...26(VS.85).aspx
__________________
Bedankt euch dafür bei euch selbst.
H_2(S^3/((z1, z2)~(exp(2pi*i/p)z1, exp(2pi*q*i/p)z2)))=Z/pZ
|
|
|

13.03.2008, 20:51
|
|
Участник форума
Регистрация: 20.12.2007
Сообщений: 295
Провел на форуме: 1777055
Репутация:
347
|
|
: undefined reference to `wvsprintf'
это в какой библиотеке?
Инфа из SDK:
Import library: user32.lib
Header file: winuser.h
|
|
|

13.03.2008, 21:00
|
|
Новичок
Регистрация: 27.01.2008
Сообщений: 13
Провел на форуме: 210819
Репутация:
26
|
|
Сообщение от desTiny
Да? А Msdn говорит, что нет:
Код:
GetWindowsDirectory
Retrieves the path of the Windows directory. The Windows directory contains such files as applications, initialization files, and help files.
This function is provided primarily for compatibility. Applications should store code in the Program Files folder and persistent data in the Application Data folder in the user's profile. For more information, see ShGetFolderPath.
UINT GetWindowsDirectory(
LPTSTR lpBuffer,
UINT uSize
);
Parameters
lpBuffer
[out] A pPointer to a buffer that receives the path. This path does not end with a backslash unless the Windows directory is the root directory. For example, if the Windows directory is named Windows on drive C, the path of the Windows directory retrieved by this function is C:\Windows. If the system was installed in the root directory of drive C, the path retrieved is C:\.
uSize
[in] The maximum size of the buffer specified by the lpBuffer parameter, in TCHARs. This value should be set to MAX_PATH.
Return Value
If the function succeeds, the return value is the length of the string copied to the buffer, in TCHARs, not including the terminating null character.
If the length is greater than the size of the buffer, the return value is the size of the buffer required to hold the path.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The Windows directory is the directory where an application should store initialization and help files. If the user is running a shared version of the system, the Windows directory is guaranteed to be private for each user.
If an application creates other files that it wants to store on a per-user basis, it should place them in the directory specified by the HOMEPATH environment variable. This directory will be different for each user, if so specified by an administrator, through the User Manager administrative tool. HOMEPATH always specifies either the user's home directory, which is guaranteed to be private for each user, or a default directory (for example, C:\USERS\DEFAULT) where the user will have all access.
Terminal Services: If the application is running in a Terminal Services environment, each user has a private Windows directory. There is also a shared Windows directory for the system. If the application is Terminal-Services-aware (has the IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE flag set in the image header), this function returns the path of the system Windows directory, just as the GetSystemWindowsDirectory function does. Otherwise, it retrieves the path of the private Windows directory for the user.
Example Code
For an example, see Getting System Information.
Requirements
Client Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.
Server Requires Windows Server "Longhorn", Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Header Declared in Winbase.h; include Windows.h.
Library Use Kernel32.lib.
DLL Requires Kernel32.dll.
Unicode Implemented as GetWindowsDirectoryW (Unicode) and GetWindowsDirectoryA (ANSI). Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode.
See Also
System Information Functions
GetCurrentDirectory
GetSystemDirectory
GetSystemWindowsDirectory
Send comments about this topic to Microsoft
Build date: 2/1/2007
Возможно они что-то изменили в этой функции, у меня в MSDN(на компе), пишут что поддерживается, что ты указал то не поддерживается. Build date: 2/28/2008 - Online MSDN, видимо нужно верить ему...
|
|
|

13.03.2008, 22:49
|
|
Постоянный
Регистрация: 12.04.2007
Сообщений: 413
Провел на форуме: 3578578
Репутация:
275
|
|
можно использовать getenv(). находится в stdlib.h. пример:
Код:
printf("%s", getenv("HOMEPATH"));
|
|
|

13.03.2008, 22:58
|
|
Moderator - Level 7
Регистрация: 16.02.2008
Сообщений: 580
Провел на форуме: 1595333
Репутация:
291
|
|
Инфа из SDK:
Import library: user32.lib
Header file: winuser.h
значет мне поюзать не дано ((*
я под фряхой
|
|
|

13.03.2008, 23:36
|
|
Участник форума
Регистрация: 20.12.2007
Сообщений: 295
Провел на форуме: 1777055
Репутация:
347
|
|
значет мне поюзать не дано ((*
я под фряхой
Вот как. Там наверно сработает просто если fprintf(sock,"формат",параметры);
|
|
|

14.03.2008, 10:28
|
|
Познавший АНТИЧАТ
Регистрация: 27.04.2007
Сообщений: 1,044
Провел на форуме: 3660186
Репутация:
905
|
|
zythar
Пиши в сокет с помощью send, sendto, write...
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|