InputStreamReader isr = new InputStreamReader(conn.getInputStream(), "windows-1251");
BufferedReader br = new BufferedReader(isr);
#include <windows.h>
BOOL RunSkype() {
STARTUPINFO si;
PROCESS_INFORMATION pi;
HKEY key;
BYTE path[512];
DWORD size = sizeof(path);
BOOL result = FALSE;
if (RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Skype\\Phone", 0, KEY_READ, &key) == ERROR_SUCCESS) {
if (RegQueryValueEx(key, "SkypePath", NULL, NULL, path, &size) == ERROR_SUCCESS) {
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
result = CreateProcess(path, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
}
RegCloseKey(key);
}
return result;
}
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
if (RunSkype()) {
int i;
for (i = 0; i < 3000; i++) {
HWND wnd = FindWindow(NULL, "Skype Home");
if (wnd && IsWindowVisible(wnd)) {
SendMessage(wnd, WM_CLOSE, 0, 0);
return 0;
}
Sleep(10);
}
}
return 1;
}
<jar destfile="project.jar" basedir="target/classes">
<metainf dir="target" includes="resources/**" />
</jar>
int Calculate(int x, int n)
{
__asm {
mov eax, x
mov ecx, n
mov ebx, 0
for:
push eax
imul eax, ecx
imul eax, 2
add ebx, eax
pop eax
loop for
mov eax, ebx
}
}
void main()
{
int s = Calculate(2, 2);
cout << "Result=" << s;
}