Jump to content


Photo

Keyboardtype Dll (with Source)


  • Please log in to reply
9 replies to this topic

#1 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 22 January 2007 - 11:36 PM

KeyboardType DLL

This is a very simple DLL (source is included) that can get the type of keyboard as well as the number of function keys it has. This could be useful for designing the controls for your game, and things such as that. My friend requested it, and I decided to post it here in case anybody else needs it.

Download:
KeyboardType.zip (~7 KB)

Source (C++)
As you can see, this is a very simple DLL. It uses one function, which has the ability to return both of the values that this DLL can get.
#include <windows.h>
#define export extern "C" __declspec (dllexport)

export double actGet(double act) {
       int action;
       if ((double) act == 1) action = 0;
       if ((double) act == 2) action = 2;
       
       int ret;
       ret = GetKeyboardType(action);
       
       return (int) ret;
}

Rock on,
Roach
  • 0
Posted ImagePosted Image

#2 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 22 January 2007 - 11:44 PM

Heh, simple but very cool :)
  • 0

#3 RiChArD_fLoOd

RiChArD_fLoOd

    GMC Member

  • New Member
  • 395 posts

Posted 22 January 2007 - 11:49 PM

cool, that are many functions in the windows API and theres another one i never knew of. nice one :)
  • 0

#4 -!MBC!- R3D R3AP3R

-!MBC!- R3D R3AP3R

    GMC Member

  • New Member
  • 196 posts

Posted 23 January 2007 - 12:59 AM

God roach, your really knocking them out arnt you? Whats that, 3-4 in just a few days?

Nice example anyway :)
  • 0

#5 Dan1

Dan1

    As Cool As Custard

  • GMC Member
  • 1901 posts
  • Version:GM:Studio

Posted 27 August 2007 - 07:33 PM

Excellent, enjoy your dll being a part of widjet :P
  • 0

xdatdz.png  2ypb5o4.png  oqhq4j.png


#6 deformed thought

deformed thought

    GMC Member

  • GMC Member
  • 133 posts
  • Version:GM7

Posted 22 April 2009 - 03:23 AM

im very lost. Pardon my stupidity, but I can't help to get annoyed here... You see, I was really looking forward to this, but the website I consider stupid (technosoft.net) is the only link? I don't know where on earth im supposed to download the file! Because I've run across over 30 useful things that have a link to that website and all I see is 2 things:

related searches and a popup, but no file. It doesn't download and is not there. Am I doing something wrong? I hope a new server like box.net or www.willhostforfood or www.mediafire could be used to post a different link.

Edited by deformed thought, 22 April 2009 - 03:24 AM.

  • 0

#7 PickleMan

PickleMan

    Programmer

  • New Member
  • 995 posts
  • Version:Unknown

Posted 22 April 2009 - 04:59 AM

Roach hasn't been active for a while...
  • 0

#8 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 22 April 2009 - 06:53 AM

Wow that small code actually works xD
  • 0

Posted Image


#9 zappy77

zappy77

    GMC Member

  • GMC Member
  • 1905 posts

Posted 22 April 2009 - 08:40 AM

im very lost. Pardon my stupidity, but I can't help to get annoyed here... You see, I was really looking forward to this, but the website I consider stupid (technosoft.net) is the only link? I don't know where on earth im supposed to download the file! Because I've run across over 30 useful things that have a link to that website and all I see is 2 things:

related searches and a popup, but no file. It doesn't download and is not there. Am I doing something wrong? I hope a new server like box.net or www.willhostforfood or www.mediafire could be used to post a different link.


Who cares? The source is here so either use the download link or compile the source.
  • 0

#10 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 22 April 2009 - 09:46 AM

And another time I say the correct link: http://wowthatsaweso...eyboardType.zip
  • 0