Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
Y

Yashusid

@Yashusid
About
Posts
33
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • avoid loading an already loaded shared library
    Y Yashusid

    Please find my problem in datail... The problem statement: -------------------------------------------------------------------------------- Problem with loading a dependant shared object while loading the parent shared object. Description: -------------------------------------------------------------------------------- My project has a java module. At runtime this java module loads a JNI shared object(libJNIApi.so).This JNI shared object is dependant on a CPP shared object (libV5Capi.so). Both objects reside in the same directory under installation directory. But the installation directory is not pre defined and can be anywhere on the system. When libJNIApi.so is loaded through java call System.load("InstallPath/lib/libJNIApi.so"), it also tries to load the libV5Capi.so. This works fine when the java is invoked from the directory where the libraries are present. But when java is run from a different loaction, the load fails. The error during this load is java.lang.UnsatisfiedLinkError: /home/chikkall/test//lib/libJNIApi.so (JVMPORT003E Dependent module libV5Capi.so could not be loaded) at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:952) at java.lang.System.load(System.java:440) at com.ov.lic.sm.Init.init(Init.java:154) at com.ov.lic.sm.ConfigManager.init(ConfigManager.java:194) at com.ov.lic.sm.ConfigManager.initialize(ConfigManager.java:245) at com.ov.lic.sm.ConfigManager.initialize(ConfigManager.java:259) at com.ov.lic.sm.ConfigManager.initSecurityModule(ConfigManager.java:170) at com.ov.lic.sm.ConfigManager.InitializePath(ConfigManager.java:87) at com.ov.lic.sm.SecurityModule.InitializePath(SecurityModule.java:59) at JDemoUtility.initPath(JDemoUtility.java:83) at JDemoUtility.main(JDemoUtility.java:938) libJNIApi.so is searching for the libV5Capi.so in the current working directory and fails to find it. Options we considered: -------------------------------------------------------------------------------- 1. Load the dependent shared object(libV5Capi.so) explicitly in java module before loading the parent shared object(libJNIApi.so). 2. Use $ORIGIN in the runtime path of libJNIApi.so, which gets resolved to the absolute path of libNIApi.so at runtime. Both options work for all unix flavors. But on AIX, For option 1: The parent library still tries to load the dependent library, even if it is loaded. For option 2: $ORIGIN option is not available(couldn't find in the linker n loader manuals) Build details: --------------------------------

    C / C++ / MFC c++ tutorial

  • avoid loading an already loaded shared library
    Y Yashusid

    Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu

    C / C++ / MFC c++ tutorial

  • How to avoid loading an already loaded shared library
    Y Yashusid

    Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu

    Managed C++/CLI c++ tutorial

  • Linking C library in C++ application
    Y Yashusid

    I am linking a C library in C++ application. i have declared function in my c.h #ifdef __cplusplus extern "C" { #endif int fun(int,int); #ifdef __cplusplus } #endif created my c.lib now in my capp.cpp i have included this c.h as #include "c.h" and i have linked the c.lib and calling this fun function in my cpp application as int x=fun(2,3); directly ... would this work ?? how can i be sure that the library is linked propery ??

    C / C++ / MFC c++ question

  • Calling exported functions from a static DLL
    Y Yashusid

    Thanks ... I have included this x.lib Is it possible to call those function from the x.lib in y.exe application directly?? like if a function add(int,int) is implemented in x.lib ...can i call in y.exe as int n=add(2,3) ??

    C / C++ / MFC json

  • Calling exported functions from a static DLL
    Y Yashusid

    I am using VS2005. Thanks a lot Matthew

    C / C++ / MFC json

  • Calling exported functions from a static DLL
    Y Yashusid

    I think the 2) option does work for me. i will clarify my doubt again, please confirm whether 2) option works or not. I have some code x when built it gives x.dll and creates x.lib. Currently i m loading x.dll by LoadLibray and calling function thro' GetProcAddress. Now i want to call those same functions but want to avoid using LoadLibray and GetProcAddress. How it could be done ?? Thanks a lot !!!!

    C / C++ / MFC json

  • Calling exported functions from a static DLL
    Y Yashusid

    I have a x.lib and x.dll. its a static dll. Now i am using functions exported in this dll by loading this dll and calling functions thro GetProcAddress API. Now i don't want to load dll instead i want to use x.lib, Please let me know how i can call those functions by using x.lib

    C / C++ / MFC json

  • What is core dump ?
    Y Yashusid

    Hi, I have heard of core dump, but i have no idea what is it ? How to use it in Visual Studio for debugging ? Is it a file ?? Please help me in understnading this....

    C / C++ / MFC question csharp asp-net visual-studio help

  • How to find out whether my system is 16, 32 or 64 bit ?
    Y Yashusid

    Hi All, How to find out whether my system is 16, 32 or 64 bit ? both by programmatically and manullay ????

    C / C++ / MFC tutorial question

  • SCM: Does it handle crashing/abruptly killed services ?
    Y Yashusid

    I have a service, i need to do some task when its been killed from task manager/abruptly stopped. How can i do it ? does SCM sends some message so that i can handle it in Service Control handler function ??

    C / C++ / MFC question

  • what is the message when Service abruptly stopped
    Y Yashusid

    Hi, I have one service, if it stopped normally by either stopping it thro SCM applet or user manually shutting down the system i am doing all the processing before it shuts down in Service Control handler function when it receives SERVICE_CONTROL_STOP or SERVICE_CONTROL_SHUTDOWN messages. But I need to handle when this service is killed/stopped abruptly thro task manager or thro some other means. what message does it send to Control handler function so that i can do something here , or please tell me how to handle this ? Thanks...

    C / C++ / MFC question tutorial

  • Windows service problem
    Y Yashusid

    yeah this is a very good idea... Thanks a lot!!!

    C / C++ / MFC help java tutorial question

  • Windows service problem
    Y Yashusid

    which is virus ?

    C / C++ / MFC help java tutorial question

  • Windows service problem
    Y Yashusid

    I have created a Service exe thro VS6.0 Wizard and i am running a batch file from Run() method, in this batch file i am running java.exe. It runs and functions correctly but if i kill java.exe thro task manager the service exe is still running. How to make service exe also to exit when java.exe is no longer running ? Any help would be appreciated... Please help me....

    C / C++ / MFC help java tutorial question

  • Getting some error while using make file...
    Y Yashusid

    SUPERB!!!!! EXCELLENT answer,.............i followed your method 1, it works i am able to build thro make file... THANKS A LOOOOOOOOOTTTT!!!!!!!!!!!

    C / C++ / MFC c++ com tools xml help

  • Getting some error while using make file...
    Y Yashusid

    Hi, I have written some program in VS6.0, to parse an XML file, CoInitialize(NULL); CComPtr spXMLDOM; CComPtr spXMLNode; IXMLDOMAttribute *pIXMLDOMAttribute = NULL; IXMLDOMElement *pIXMLDOMElement = NULL; HRESULT hr = spXMLDOM.CoCreateInstance(__uuidof(DOMDocument)); VARIANT_BOOL bSuccess = false; USES_CONVERSION; _variant_t fileNameValue=T2W(RegFile); FILE *fp=fopen(RegFile,"r"); if(fp && !(spXMLDOM->load(fileNameValue,&bSuccess))) { hr = spXMLDOM->get_documentElement(&pIXMLDOMElement); _variant_t nameValue; if(!hr && !(pIXMLDOMElement->getAttribute(CComBSTR(L"source- name"),&nameValue))) { if ( nameValue.vt == VT_BSTR ) { USES_CONVERSION; sourceName = W2T(nameValue.bstrVal); } } spXMLDOM.Release(); // Stop COM CoUninitialize(); For this i have installed Microsoft SDK, and i am setting the path of this in Tools->Options->Directories... It builds correctly from the workspace, but if i try to build from make file using "NMAKE /f "Test.mak" CFG="Test - Win32 Release", It gives many errors, some are:: cl.exe @C:\DOCUME~1\chikkall\LOCALS~1\Temp\nma03112. DCRegistry.cpp DCRegistry.cpp(386) : error C2065: 'IXMLDOMDocument' : undeclared identifier DCRegistry.cpp(386) : error C2955: 'CComPtr' : use of class template requires template argu ment list C:\PROGRA~1\MICROS~3\VC98\ATL\INCLUDE\atlbase.h(563) : see declaration of 'CComPtr' DCRegistry.cpp(386) : error C2133: 'spXMLDOM' : unknown size DCRegistry.cpp(386) : error C2512: 'CComPtr' : no appropriate default constructor available DCRegistry.cpp(386) : error C2262: 'spXMLDOM' : cannot be destroyed DCRegistry.cpp(387) : error C2065: 'IXMLDOMNode' : undeclared identifier DCRegistry.cpp(387) : error C2955: 'CComPtr' : use of class template requires template argu These errors indicate me that Microsoft SDK directory is not getting linked for building, how to make SDK directory available for build in mak file ????

    C / C++ / MFC c++ com tools xml help

  • "Allow service to interact with desktop" option for Windows service
    Y Yashusid

    is it only for making interactive or something else is also there ? We have a service for our application, and our application uses another application. The option "Allow service to interact with desktop" for this service is set. If i set this option checked for my service then only my application works, otherwise no. For my application to work, both the services's option must be either checked or unchecked.

    Windows Forms question

  • "Allow service to interact with desktop" option for Windows service
    Y Yashusid

    Can anyone please let me know what is the difference between a service with "Allow service to interact with Desktop" checkbox checked and unchecked ?

    Windows Forms question

  • make files from VS6.0 in VS2005
    Y Yashusid

    Hi, I have my project written/compiled/build using VS6.0 and i am exporting a make file to build from command line, now i am planning to upgrade to VS2005, Now how i can build this project using VS2005 ? Do i need to make any changes to make file itself or there are any other ways to do it ? Thanks, Yashu

    Visual Studio question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups