I have pasted the dll in appropriate location.But still I am facing same error.
shanmugarajaa
Posts
-
How to Call C++ dll in java -
How to Call C++ dll in javaDear Friend, I build the dll(Maths) in visual studio 2013 win32. Hide Copy Code #include "stdafx.h" #include extern "C" { __declspec(dllexport) int Add(int x, int y) { return x+y; } } and tried to call this dll in java using JNA library. Hide Copy Code import com.sun.jna.Native; import libs.IMathFunc; public class MathFuc { public static void main(String[] args) { // TODO Auto-generated method stub IMathFunc mathfunc = (IMathFunc)Native.loadLibrary("Maths", IMathFunc.class); int addition = mathfunc.Add(5, 5); System.out.print(Integer.toString(addition)); } } But I dont knwon where I am making mistake Can anyone refer me an atricle or sample application on this issue. Please kindly help me on this issue. Thanks, S Shanmuga Raja What I have tried: I have used JNA library. But it throwing error like: Hide Copy Code Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'Maths': JNA native support (win32-amd64/Maths.dll) not found in resource path (E:\Maths\Demo\bin;C:\Program Files\JAVA\jna-3.5.2.jar\jna-3.5.2.jar;E:\MathsDemo\x64\Debug;C:\Program Files\JAVA\jdk1.8.0_71\include\win32) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:220) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:322) at com.sun.jna.Library$Handler.(Library.java:142) at com.sun.jna.Native.loadLibrary(Native.java:387) at com.sun.jna.Native.loadLibrary(Native.java:366) at MathFuc.main(MathFuc.java:13)
-
Assertion failure While Editing CTreeView Label.Dear Friend, After adding all necessary message handler to support to edit label in CTreeView
void CMyTreeView::OnBeginLabelEdit( NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
// This is the Limit the size of the Tag Name to 127
CTreeCtrl &ctlFiles = GetTreeCtrl();
ctlFiles.GetEditControl()->LimitText( 127 );
*pResult = 0;
}void CMyTreeView::OnEndLabelEdit( NMHDR * pNMHDR, LRESULT * pResult )
{
*pResult = TRUE;
}BOOL CMyTreeView::PreTranslateMessage(MSG* pMsg)
{if ( pMsg->message == WM\_KEYDOWN ) { CTreeCtrl &ctlFiles = GetTreeCtrl(); CEdit\* edit = ctlFiles.GetEditControl(); if (edit) { if( GetKeyState( VK\_CONTROL ) && pMsg->wParam == VK\_C ) { edit->Copy(); return TRUE; } if( GetKeyState( VK\_CONTROL ) && pMsg->wParam == VK\_V ) { edit->Paste(); return TRUE; } if( GetKeyState( VK\_CONTROL ) && pMsg->wParam == VK\_X ) { edit->Cut(); return TRUE; } if( GetKeyState( VK\_CONTROL ) && pMsg->wParam == VK\_Z ) { edit->Undo(); return TRUE; } if( pMsg->wParam == VK\_RETURN || pMsg->wParam == VK\_ESCAPE || pMsg->wParam == VK\_CONTROL || pMsg->wParam == VK\_INSERT ) { edit->SendMessage(WM\_KEYDOWN, pMsg->wParam, pMsg->lParam); return TRUE; } } } return CTreeView::PreTranslateMessage(pMsg);
}
If I press a character 'a' to 'z' and 'A' to 'z' then MFC throwing Assertion. I don't know what I am missing out to avoid this issue. Kindly help me on this. Thanks, S Shanmuga Raja
-
Assert failure when I comment SetRegistryKey(_T("Local AppWizard-Generated Applications"))Hi Friends, My application don't want to create any entry in registry. If I comment SetRegistryKey(_T("Local AppWizard-Generated Applications")) then application throw an Assert failure. How to overcome from this problem. Thanks, S Shanmuga Raja
-
where "FindFirstFile" fetch drive information ?Hi Friends, Where FindFirstFile function fetching all folders, sub folders and files details? whether this API fetching information from registry? Thanks, S Shanmuga Raja
-
how to disable uac prompt programmaticallywhether its possible to assign administrator right to my application though programmatically. So that I can set value 0 or 1 to EnableLUA in registry.
-
how to disable uac prompt programmaticallyDear Friends, I have requirement to disable UAC prompt through programmatically. Please anyone help me on this. Thanks, S Shanmuga Raja
-
Application crash when reading file from mapped network drive is discoonectedHi friends, case 1: I am opening a file from network drive location. During file read, the mapped network drive is disconnected, my application get crashed and closed. how to check the mapped network drive is connected or not using file pointer. case 2: during file read, I am disconnecting and connecting the mapped network drive that time pointer is not null. but I cant able to access a file using this file pointer. Thanks, S Shanmuga Raja
-
How to constructor a storage class to store Tree data in C++Actually in want to store it in vector or list or any other data structure. For that, I want to constructor class.
-
How to constructor a storage class to store Tree data in C++Dear Friends, I want to constructor a storage class, which should have the ability to store Tree data in tree hierarchy manner. For example: Like Root folder -->sub folders---> sub folders --> files. your suggestion and guidance are highly appreciate. Thanks and Regards, S Shanmuga Raja
-
How to create lib file for header file alone.Dear Friends, I have header file named as sample.h. My intention is, I don't want to modified this header by others (programmer). So I decided to create lib file for this header file alone.whether is possible?? I don't know whether my approach is right.. kindly help on this.. your suggestion are highly appreciated. Thanks S. Shanmuga Raja
-
Whether PHP read shared memory which is created using C++Dear Friends, My application is developed using VC++. This application, create shared memory using C++. My Requirement is: 1. PHP read and write this shared memory. 2. displaying those values in browser. your suggestion highly appreciate. Kindly help on this. Thanks and Regards, S Shanmuga Raja
-
VC2008 Feature Pack ProblemDear folks, Requirement is to Improve the application GUI So I have used VC2008 Feature Pack version 9.0.30411.0 and obtained the desired looks. But Now the problem is, If I run the application exe in target PC which feature pack is not installed. Then I'm unable to run the application due to feature pack is not get installed in target PC. Normally we do, if I incorporate new component like "MSFlexGride", then the appropriate OCX file is added in the installation procedure. But In this case I couldn't find out related "DLL" or "OCX" files. Kinldy help me to fix this problem.
-
Arithmetic operation in pointer using CHi friends, I tried out something like this which is given below in VC++ by referring Dennis M. Ritchie (ANSI C second edition) book examples. struct Key *low = &tab[0]; struct Key *high = &tab[n]; struct Key *mid; mid = low + (high-low) / 2; // Error: cannot convert from 'int' to 'struct Key *' My question is how they are using this expression mid = low + (high-low) / 2;?. I don't know whether I misunderstood the concept or there is some difference between ANSI C and VC++. Please anyone help me in this. Regards, S.Shanmuga Raja
-
How to control Scroll bar in CListCtrl using VC++Dear Friends, I have been Updating CListCtrl very second. Now problem is, I can't able to drag scroll bar down. Every time List control gets updated and scroll automatically goes up. Can you anyone help me to come out from this problem Thanks and Regards, S.Shanmuga Raja
-
s,Dear Friend
-
how to start Mobile Application?Dear Friends, I am currently working for MFC and VC++ application. But I have interest to develope mobile application. I can anyone suggest me any material or courses or link and kidly tel me What are hardware and software required.. Thanks and Regards, S.Shanmuga Raja
-
How to store and retrieve data from database via internet using VC++2008First I am getting doubt whether you are engineers??? you don't know to behave in general forum.. If you are not interest to answer to my question then nothing Problem.. Thanks for your comments.. Richard MacCutchan, ThePhantomUpvoter, Erudite_Eric I am sure this engineers spoil and pull down the code project respect and dignity. Dear Friends (Richard MacCutchan, ThePhantomUpvoter, Erudite_Eric) please go through " HOW TO ANSWER A QUESTION" by Mr.Chris Maunder I hope code project take necessary action against them..
-
How to store and retrieve data from database via internet using VC++2008Right now Application connected with database using OLEDB(connective). User are using this application within the same network(same building). Now they want to access the database from different place(not in the same network and different country). My question is same connective(OLEDB) procedure helpful for this scenario?
-
How to store and retrieve data from database via internet using VC++2008My Database in India n my user access database from some other country. Plz tell me, for this scenario what connective needed to access the database.