Should i necessarily first have a .h and then convert it to a .dll?

hi.
i want to use windows 98 APIs.
but i recieve a linker error. i've see many
JNI example that convert a header file to a .dll
but is windows we have .DLLs not header!?
should i necessarily first have a .h and then
convert it to a .dll?
it's my code:
public class JNItest
long returnValue;
static
System.loadLibrary("user32");
public native long EmptyClipboard();
public void free()
returnValue = EmptyClipboard();
public static void main(String args[])
new JNItest().free();
I SET THE PATH OF SYSTEM DIRECTORY OF WINDOWS FOR LINKER TO FIND
USER32.DLL BUT I RECIEVE THIS ERROR:
Exception in thread "main" java.lang.UnsatisfiedLinkError: EmptyClipboard
at JNItest.EmptyClipboard(Native Method)
at JNItest.play(JNItest.java:14)
at JNItest.main(JNItest.java:18)
please help.
thanks a world.

You can't call EmptyClipboard directly from your Java code.
You need to run javah against that source file. It will generate a C++ header file with the definition of the native method you declare in your Java file. You create a C++ DLL that includes that header file and implement that stub function in C++. It will simply call the Win32 EmptyClipboard function.
Then, you add a line in your Java source to loadLibrary the new DLL after User32, and it should work. See the JNI tutorial for details.
Tim

Similar Messages

  • Do I still have to save the PDF first in my file then retrieve it in Adobe and then convert?

    When I receive a document do I first have to save it in my computer then go into abobe, then load it in there and then convert to a doc?

    Hello,
    1) Launch Adobe Reader X
    2) Click on "Edit" on Meu Bar and click on "Preferences"
    3) Go to the option "Internet" from left hand list
    4) Make sure "Display PDF in Browser is checked"
    5) Save the changes and close Reader X
    Screenshot attached :
    Then try to view any PDF in browser.
    Thanks
    Vikram

  • How do I turn off the default radio in my music app.  I cannot play my playlist until it first defaults to radio and then I have to start all over. this is very tedious!!!

    how do I turn off the default radio in my music app.  I cannot play my playlist until it first defaults to radio and then I have to start all over. this is very tedious!!!

    This got me curious when I first saw it... It does indeed seem very Un-Apple-like (at least historically) to prevent a user from customizing their own device - Mac or iDevice - but today I'm unsure. I cannot grasp how a UX designer could leave a simple "OFF" switch out of the control panel. Another thing that Music Data Streaming does is eat up your Data Plan.
    This May  not be the exact issue as you describe, but seems to solve an issue of a Radio Playlist in iTunes resuming where it left off from the last use...
    My Carly girl     May 18, 2014 6:25 PM 
      Re: How do you turn off i tunes radio on the ipad air once it starts playing songs?  in response to Betty91545        
    Play last song on list, songs will then stop.  Works for me on iPad. Haven't tried yet on iPhone.
    It is likely that THIS may be part of the real reason to push the iTunes Radio feature - revenue stream (nobody remembers "Payola?"):
    Apple is more beholden to the shareholders than in the old days

  • Bug Report for files first opened in Bridge and then worked in Photoshop

    I encountered a problem with files first opened in Bridge and then worked in Photoshop as follows:
    1.  I opened a raw file in Bridge and then after corrections sent to Photoshop with no problem, however, after correcting and saving the file I then went back to the option of closing file and going to bridge.  It closes file and stays in Photoshop.  In order to get back to bridge I must either click on the bridge logo at bottom of screen or request to go to bridge.
    2.  I tested the same thing in CS-5 and it works like it is suppose to you click on close and go to bridge and it immediately takes you back to bridge. 
    3.  Unless this is a new feature or suppose to work this way then it is a bug.
    NancyZ

    Hi Curt
    Yes, I am talking about opening a file in bridge doing necessary corrections etc and then sending on to Photoshop.  Once I do necessary corretions and save in Photoshop my next step would be to select close and open in bridge which is a choice.  In previous Photoshops that I have used (CS4 and CS5) when you did this it would close the file and then immediately take you back to bridge.  Now under CS6  if you select close and go to bridge it closes the file but remains in Photoshop.  If bridge is not a choice when you select close and open in bridge why even have that as a choice?  Why not just select close and then click on bridge logo or Control Alt O or select go to bridge? 
    Nancy

  • Ios7 "Cannot Connect to iTunes Store". When I try clicking on the "Terms and Conditions" in iCloud, it first says "Cannot Connect" and then the following mes

    Hi, I have upgraded my iphone 4s to ios7 and now when I am trying to login to app store, it says "Cannot Connect to iTunes Store". When I try clicking on the "Terms and Conditions" in iCloud, it first says "Cannot Connect" and then the following message: "Verification Failed: the certificate for this server is invalid. you might be connecting to server that is pretending to be setup.icloud.com, which could put your confidential information at risk". My wifi is working properly as I have accessed websites from safari. I reset my network settings too and even reset my password. But none of these get my iphone working.

    I'm having the same problem with the iTunes Store...it much be down :(

  • Can't SMS people who have gone overseas and then come back - weird!!!!!!

    I have a problem with my texts when OTHER people go overseas. When they come back from overseas they can text me but I can't return their text. This has happened 3 times now with 3 different people. I have tried deleting and adding their number and entire contact again, added and deleted the +61 before their number.
    One of the people's text came to me from their @icoud name but they were actually sending it from their phone and the phone setting said they had sent it from their actual telephone number.
    When i tried to reply it bounced back but when I returned text to their @icloud address it went through as a normal text and ended up their conversation thread from me.
    As I mentioned its only happened to people who have been overseas and then come back to Australia.
    Very confusing - any ideas anyone.
    thanks Craig

    Sorry it took me so long to write back, But unfortunately this didn't help my issue.
    My uncle and I did a lot of tests on this computer and have narrowed down the location of the problem a little bit.
    We tried to first reset the SMC and the NVRAM as suggested, but the only thing that did was make the fans run on full tilt for the first session after restarting it for some reason. After that we tried re installing OSX over the OSX that was already on the system (not removing any of the files). This also didn't do anything but make refit stop working. Then we moved onto the next task at hand by removing the hard drive entirely and booting it as an external drive from one of the USB ports... as long as you booted it with the options key held down, it worked perfectly fine. Then we put an alternative hard drive into the computer and installed OSX on that. This time there was no trouble booting anything up. Everything seemed to work flawlessly. So we made a backup of my original drive (OSX, Windows, and all) onto an external hard drive and tested booting to it via USB. That again worked perfectly fine and booted right up with no problems. So after that we formatted the original hard drive and reinstated OSX. We then proceeded to transfer all the old files from the backup onto this new installation and LOW AND BEHOLD..... we were back to square one with it refusing to recognize the hard drive again.
    So this basically told us that there appears to be something either wrong with the hard drive, or something got really screwed up in the software along the lines and by me copying all my old files back over, I just ended up bringing the screwed up file back over with it! (despite not copying over any settings of any kind) So I am still extremely confused as to what is going wrong... did some boot sector possibly get screwed up may be?

  • I can not sync my iPhone to the computer. I keep getting up an error message that synchronization does not want to start. I have uninstalled iTunes and then reinstall it. But the same warning box will appear. How can I get my phone in sync again?

    Can someone please help me get my iPhone to sync to your computer?
    I can not sync my iPhone to the computer. I keep getting up an error message that synchronization does not want to start. I have uninstalled iTunes and then reinstall it. But the same warning box will appear. How can I get my phone in sync again?

    Hello lenmin,
    Thanks for using Apple Support Communities.
    To help resolve this issue where you're repeatedly prompted to authorize with your Apple ID in iTunes when syncing, please follow the directions in the article below.
    iTunes: Missing folder or incorrect permissions may prevent authorization - Apple Support
    Have a great weekend,
    Alex H.

  • I lost my ipad, and when i logged in to my apple account, i found another person email. what can i do to trace ? my ipad hasnt been registered with apple before i lost it, can i registered now (as i still have the package) and then supply the serial no.

    Hi, just wonder anyone can help. i lost my ipad few weeks ago (already reported to police in UK but they arent helpful), and when i logged in to my apple account, i found another person email added to my apple account (but has not been verified). what can i do to trace ? my ipad hasnt been registered with apple before i lost it, can i registered now (as i still have the package) and then supply the serial no. to apple so they can block that ipad??
    i am based in london, but seems now the apple account based in USA.. very strange.
    i am using iphone as well, so beforei lost the ipad, when i download apps, it download to both iphone and ipad.
    i am not sure what i can do to make apple aware of the lost ipad, as i havent registered my ipad before i lost it. or can i registered now and report a lost??
    appreciate any advice..
    thanks

    The only tracking feature Apple offers is the one tied to your iCloud account (https://www.apple.com/icloud/features/find-my-iphone.html).  If you did not have an iCloud account set up on the iPad, or did not have the "find my iPad" setting enabled under that account's settings, then you cannot track it remotely.
    There is nothing you can do but hope the police do something, or you find it yourself.  Apple does not get involved with lost or stolen property.
    see http://support.apple.com/kb/HT2526
    However, I hope you IMMEDIATELY changed your AppleID password when you noticed the added email - the only way someone could do that is if they know both your AppleID primary email address AND your current password.

  • I cannot seem to sign in to creative cloud. It asks me to sign in. Once I have, it cycles , and then tells me that "you've been signed out"..  It then repeats the cycle over and over again

    I cannot seem to sign in to creative cloud. It asks me to sign in. Once I have, it cycles , and then tells me that "you've been signed out"..  It then repeats the cycle over and over again

    Sign Out When Sign In http://forums.adobe.com/thread/1450581?tstart=0 may help
    -and http://helpx.adobe.com/creative-cloud/kb/unable-login-creative-cloud-248.html
    or
    Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • The new firefox twitter app is great - except it disappears every time I shut down the computer and I have to remove and then reinstall it every day!?? I am working on an iMac - if that is causing the problem ...? Thanks.

    The new firefox twitter app (mini tab on left of page) is great - except it disappears every time I shut down the computer and I have to remove and then reinstall it every day!?? It won't appear on the page until I do. I am working on an iMac - if that is causing the problem ...? Thanks.

    Eustace, thank you so much for writing back.  I will try what you suggested!!
    thx for your reply - apparently when I went to the Apple store a long time ago, they restore maybe photos and itunes etc from my external hard drive (passport).  I guess at that time they reinstalled an earlier operating system than my macbook came with and that somehow corrupted FileVault.  apparently there was no sparse bundle (whatever that is) for my old admin account and they said that ever since the install of the older OS that it was actually NEVER backing up anything in my admin account.
    Then, I bought Time Capsule and starting backing up to that instead.  I started having problems with it being slow etc and then StartUp Disk full errors and didn't know what to do, so I "Restored" from Time Capsule and that's when I lost everything in my Admin account and was locked out when I tried to log in - it said File Vault error ..."
    anyway - that's THAT sad story.  I was told to create a new admin account and I've basically been trying to start over - even though I have a partial save of my computer in Crash Plan and I DO see a sparse bundle listed in there, but I just don't know enough about computers to know if it's something I can get back or if I am just totally doomed. 
    I'm afraid to reinstall anything because if there is even a remote shot that the other files are still floating around in my computer, I feel like that chance will be shot forever.  I need to hire McGee from NCIS, I just KNOW he could get those files back for me!!!

  • I have a Mac 10.5.8 Dual. I cannot get any videos that I have stored to play. I have tried QT and then DL two out side players from apple site and then went to install and comp said can not be installed on this comp.

    I have a Mac 10.5.8 Dual. I cannot get any videos that I have stored to play. I have tried QT and then DL two out side players from apple site and then went to install and comp said can not be installed on this comp.

    When Microsoft decided not to support Windows Media any more, they made Flip4Mac available for free. If you have not taken advantage of that free download, this might be a good time.
    It may not completely solve the problem, but your Mac will play more with the free player. No need to pay for the Upgrades.
    http://www.telestream.net/flip4mac/

  • How many symbolic accounts, I have to create and then assign them to res...

    Hi friends,
    I am in the BBP creation phase, I have created the list of wage types for my client, there are 41 wage types, now as far as posting to accounts is concerned, how many symbolic accounts, I have to create and then assign them to respective G/L accounts ?
    Please throw some practical light on this, I know all theory 
    Thanks
    Jay

    Hi Jay
    We wouldnt be able to tell you exactly how many symbolic accounts you may need to create for the 41 Wage Types as it is specific to your requirement.
    Check these links out: Symbolic Accounts..
    http://sappeers.wordpress.com/category/sap-fi-hr-integration/
    It might help you with a fair understanding of what you need to do.
    Example for linking wage types to symbolic accounts: basic pay wage type u20181000u2019 is linked to symbolic account u20188888u2019 (Salaries & wages)
    Hope this helped!

  • Can i ever get my photos back if i have deleted them and then emptied the trash?

    can i ever get my photos back if i have deleted them and then emptied the trash?

    Yes — just restore them from your backup.
    No backup? This is why you need one. Now you know.
    You may be able to recover some or all of your pictures, but not the structure of your iPhoto Library, using one of these data recovery utilities:
    Data Rescue 3: http://www.prosofteng.com/products/data_rescue.php
    FileSalvage 7: http://subrosasoft.com/OSXSoftware/index.php?main_page=product_info&products_id= 1
    Both are offered in demo versions that will show you what the full version could recover before you have to pay for anything.

  • I often receive photos as attachments to emails.s there Ian easy way to save them directly to Photoshop Elements? Or do I have to save and then import?

    Is there an easy way to save them directly to Photoshop Elements? Or do I have to save and then import?

    Well... I appreciate both of your responses. However... I believe that lvlibs cause more frustration then anything else.  My team has come across issues with lvlibs and conflicting paths (when using CM tools) and have resorted to using LLBs because they offer a clean set of file dependencies.  I understand that lvlibs are probably more robust, but they are not an option right now. Therefore...  the question I originally asked still remains.  Is there a quick and easy way to add a bunch of VIs to an LLB without having to save each one of them separately to the LLB?  

  • Have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for

    have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for her iphone. we need to save her photos, music, etc to ? icloud and the phone stuff to verizon cloud? so when she gets her new Iphone6 she can have all her "stuff" back on the new phone. hope this makes sense. please offer suggestions here or at [email protected] thanks for your help!

    Oh no! I'm sorry to see there's a lot of confusion here and data shared, x-rayDon. We can definitely work to fix. This happens when two devices share the same Apple ID, so she will need to reset hers. She can do so by assessing this link Apple - My Apple ID. You will need to decide who will keep the account if want separate Apple IDs since purchases cannot be shared unless you do Family Sharing.
    RobinD_VZW
    Follow us on twitter @VZWSupport

Maybe you are looking for