ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2

ANTICHAT — форум по информационной безопасности, OSINT и технологиям

ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию. Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club, и теперь снова доступен на новом адресе — forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.
Вернуться   Форум АНТИЧАТ > Программирование_OLD > С/С++, C#, Delphi, .NET, Asm
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #861  
Старый 13.03.2008, 18:39
desTiny
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
 

  #862  
Старый 13.03.2008, 19:02
KSoniX
Познающий
Регистрация: 17.01.2008
Сообщений: 94
Провел на форуме:
314553

Репутация: 38
Отправить сообщение для KSoniX с помощью ICQ
По умолчанию

мне нада чтобы было универсально для всей винды
и как создать системный скрытый папку в Си
desTiny идея та хорошая но если у нево на двух директориях стоит винда то тагда что делать?
на виндах ниже ИТ работает ли функция GetWindowsDirectory()??

Последний раз редактировалось KSoniX; 13.03.2008 в 19:06..
 

  #863  
Старый 13.03.2008, 19:28
noobyara
Новичок
Регистрация: 27.01.2008
Сообщений: 13
Провел на форуме:
210819

Репутация: 26
По умолчанию

Цитата:
Сообщение от KSoniX  
на виндах ниже ИТ работает ли функция GetWindowsDirectory()??
ниже NT? да.(с 95 начиная).
Еще по твоей теме можешь посмоьреть это http://delphiworld.narod.ru/base/windows_name_spaces.html
 

  #864  
Старый 13.03.2008, 20:13
desTiny
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
 

  #865  
Старый 13.03.2008, 20:51
bons
Участник форума
Регистрация: 20.12.2007
Сообщений: 295
Провел на форуме:
1777055

Репутация: 347
По умолчанию

Цитата:
: undefined reference to `wvsprintf'

это в какой библиотеке?
Инфа из SDK:

Import library: user32.lib
Header file: winuser.h
 

  #866  
Старый 13.03.2008, 21:00
noobyara
Новичок
Регистрация: 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, видимо нужно верить ему...
 

  #867  
Старый 13.03.2008, 22:49
Forcer
Постоянный
Регистрация: 12.04.2007
Сообщений: 413
Провел на форуме:
3578578

Репутация: 275
Отправить сообщение для Forcer с помощью ICQ
По умолчанию

можно использовать getenv(). находится в stdlib.h. пример:
Код:
printf("%s", getenv("HOMEPATH"));
 

  #868  
Старый 13.03.2008, 22:58
zythar
Moderator - Level 7
Регистрация: 16.02.2008
Сообщений: 580
Провел на форуме:
1595333

Репутация: 291


Отправить сообщение для zythar с помощью ICQ
По умолчанию

Цитата:
Инфа из SDK:

Import library: user32.lib
Header file: winuser.h
значет мне поюзать не дано ((*
я под фряхой
 

  #869  
Старый 13.03.2008, 23:36
bons
Участник форума
Регистрация: 20.12.2007
Сообщений: 295
Провел на форуме:
1777055

Репутация: 347
По умолчанию

Цитата:
значет мне поюзать не дано ((*
я под фряхой
Вот как. Там наверно сработает просто если fprintf(sock,"формат",параметры);
 

  #870  
Старый 14.03.2008, 10:28
krypt3r
Познавший АНТИЧАТ
Регистрация: 27.04.2007
Сообщений: 1,044
Провел на форуме:
3660186

Репутация: 905


По умолчанию

zythar
Пиши в сокет с помощью send, sendto, write...
 
 





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ