DriverHeaven.net

 
Looking for the skin chooser?
 
 
  • Home

  • Reviews

  • Articles

  • News

  • Tools

  • GamingHeaven

  • Forums

  • Network

 

Go Back   DriverHeaven.net > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > General Discussion


Reply
 
LinkBack Thread Tools
Old Aug 9, 2006, 04:10 PM   #1
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56
Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!

kX Project SDK and development

some time ago there were questions about porting kX Driver to a more recent compiler (e.g. VS .Net etc.) or to any 'free' compiler (GNU/mingw32/...)

the main problem is with VS6's MFC headers and libraries - the new versions are no longer compatible with kX

the best solution so far is to get a -free- version of compiler + headers + libraries from microsoft: http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx

the package is called 'KMDF', although it is just Windows .NET DDK + KMDF extensions

this should fix any compatibility issues, since I use KMDF1.1 for building kX Driver

Eugene
Eugene Gavrilov is offline   Reply With Quote


Old Aug 10, 2006, 05:02 AM   #2
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

To summerize all this a bit;

1. It is *not* possible to develop kX plugins, or otherwise use kX API,
with any non-MS compiler such as GNU/MINGW etc.
This is because of different ABIs, not because of MFC dependancies!

2. It *is* possible to develop kX plugins, or otherwise use kX API,
with any MS compiler such as VC6, and all the free .NET variants
provided that;
a. you have the correct MFC headers & libraries
(Eugene already explained where to get them for free)

or,

b. you Plugin or program doesn't use kXGUI.
In that case you don't need MFC headers & libraries at all
and any free MS .NET compiler will work.
(ProFx 3.xx works this way)
/Lex.
Lex Nahumury is offline   Reply With Quote
Old Aug 10, 2006, 08:00 PM   #3
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56
Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!

yes, this is correct

however, care must be taken when compiling with newer C++ compilers (.NET):
for 'debug' builds the compiler might generated additional code (stack checks, buffer overrun detection, exception handling) -- this might conflict with kX binaries, so, please disable such extensions
--
kX only supports 'debug' builds, since it is linked against msvcrtd and mfc42d libraries. if you wish to compile your plugins as 'release' builds, you need to be sure you do NOT use these libraries. otherwise a conflict between 'msvcrt' and 'msvcrtd' will occur.
--
the link above has full compiler, MFC libraries (headers and libs), CRT etc., however, it lacks 3-4 files. (such as 'zmouse.h' or 'richtext.h') These files are found in either in different folders of the NTDDK, or in the platform SDK. some of them can be easily changed to empty 'placeholders'.

E.
Eugene Gavrilov is offline   Reply With Quote
Old Aug 14, 2006, 02:58 PM   #4
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56
Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!Eugene Gavrilov is just super!

by the way, there's an unofficial, unsupported, unrelated to kX Project site with all MFC42 headers and libraries: http://mfc42.narod.ru/

E.
Eugene Gavrilov is offline   Reply With Quote
Old Jan 3, 2007, 01:02 PM   #5
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36
Maddogg6 has a spectacular aura aboutMaddogg6 has a spectacular aura about

Sorry to drudge up an old subject... but I was wondering what it would take to make the 'non-GUI' parts of KX API compatible with other non-MS compilers.
It seems all the discussion is on plugins - is that all the KX SDK is good for?
I would think a wrapper for the non-GUI & non-plugin aspects of KX would be possible. Like making an addon (with its own GUI, or 'ini file' based) in GCC for instance.)

Or does that conflict with the NDA E. signed??

Sorry if I ask dumb questions...

Mark
Maddogg6 is offline   Reply With Quote
Old Jan 3, 2007, 01:12 PM   #6
d/h member-shmember
 
Max M.'s Avatar
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,418
Rep Power: 47
Max M. will become famous soon enough

unfortunalty, making kX API "any compiler friendly" means rewriting everything in a pure C - a hell of stupid work... (that's not MS fault but general C++ weirdness - none of C++ compilers have compatible ABI). Finally, i'd say this would be a real waste of time (finally it would much easier for you to learn a basics of C++ then for anyone to rewrite anything from scratch in a lowerlevel language). Today, there're already three variants of free MS C++ compilers available for free (VC Toolkit (VC7.1), one built in DDK (same VC7.1 + all nesessary headers & libraries) and VC Express (VC8 + anything and IDE).
Max M. is offline   Reply With Quote
Old Jan 3, 2007, 01:25 PM   #7
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36
Maddogg6 has a spectacular aura aboutMaddogg6 has a spectacular aura about

Well I see your point max -thanks btw..

But Im more interested in the ability to import KX lib into other languages that are at least within my comprehension level - like FreeBasic or PureBasic. Which, can import C++ libs (in purebasic AFAIK)- but the name mangling need 'conversion' or something like that - But I was told the original SDK could be exported or wrapped in VC to allow more easier import... I most certainly could be (probably) confused in this, and for that I appologize.... I'm a programming idiot trying to learn and make something with KX SDK in any way I can.

I tried VC and its just too much for my idiot brain to grasp.

I'll stop now

Thanks again Max.

Mark
Maddogg6 is offline   Reply With Quote
Old Jan 3, 2007, 01:32 PM   #8
d/h member-shmember
 
Max M.'s Avatar
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,418
Rep Power: 47
Max M. will become famous soon enough

btw. if i'm not mistaken - Eugene has blustered to provide such compability. I seriously doubt - but nobody made him to say so

Last edited by Max M.; Jan 4, 2007 at 02:49 AM.
Max M. is offline   Reply With Quote
Old Feb 24, 2007, 06:35 PM   #9
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,561
Rep Power: 39
Tril is just really niceTril is just really niceTril is just really niceTril is just really niceTril is just really nice
System Specs

I successfully compiled a few kX plugins (demo, TheDelay, TimeBalanceV2) using Microsoft Visual Studio .NET 2003 by using the includes and libs in Windows Driver Kit (WDK).

You have to download WDK (2,4 GB) and install it. The files from WDK that you need for compiling kX plugins only take about 49 MB of disk space. From reading the license of WDK, it does not seem that you can legally redistribute the headers and library files. I personally installed "Microsoft Document Explorer" and "WDK Build Environments, Samples, and Documentatin (Development Kit)".

Microsoft Visual Studio .NET 2003 contains a list of include files and library files. You can get to that list that way : Tools->Options...->Projects->VC++ Directories. Before attempting to compile kX plugins, the IDE was already correctly set-up to compile Windows programs by having the includes ands libraries paths of DirectX and the Windows Platform SDK entered.

To compile kX plugins, I added the following include folders :
(WDK install folder)\inc\mfc42
(WDK install folder)\inc\api

and the following library folders :
(WDK install folder)\lib\mfc\i386

This worked to compile the demo and TheDelay plugins. When compiling TimeBalanceV2, I got a linker error on the function KillTimer. I fixed this by adding

Code:
#define _AFX_ENABLE_INLINES
before the includes of the MFC headers in StdAfx.h.
Tril is offline   Reply With Quote
Old Feb 25, 2007, 12:42 PM   #10
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36
Maddogg6 has a spectacular aura aboutMaddogg6 has a spectacular aura about

Quote:
The files from WDK that you need for compiling kX plugins only take about 49 MB of disk space
Ok - I got VS2003 working now...and I went to install the WDK - and I have a Q:

You mention we only need 49MB of what the WDK installs - yet the mcf42.zip file linked to above is showing 775KB only. I mean - thats > 50:1 compression ration does that sound right?

Id like to avoid the extra ~1,195 (thats 'thousand') MB install of the build environment of the WDK?

Has anyone verified the linked mfc42.zip works?

edit: nvrmnd - that mfc42.zip file appears to be corrupt. winzip and winrare choke on it and I notice its only 50KB not the 775KB FF d/l manager indicated.

So - I guess I'll just install the build env of WDK and let everyone know that mfc42.zip was very slow to D/L and the file doesnt open.

Mark

Last edited by Maddogg6; Feb 25, 2007 at 12:50 PM.
Maddogg6 is offline   Reply With Quote
Old Feb 25, 2007, 01:22 PM   #11
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36
Maddogg6 has a spectacular aura aboutMaddogg6 has a spectacular aura about

Update:
here before you is a complete moron who can confirm - after, installing the WDK with VC2003 as Tril posted, I was able to compile AND run successfully the KX demo plugin. And if I can do it - pfff....
Maddogg6 is offline   Reply With Quote
Old Feb 25, 2007, 03:01 PM   #12
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Lex Nahumury is offline   Reply With Quote
Old Feb 25, 2007, 03:50 PM   #13
DriverHeaven Senior Member
 
Doug W's Avatar
 
Join Date: Mar 2003
Location: Montevideo, MN USA
Posts: 957
Rep Power: 0
Doug W is on a distinguished road

Quote:
here before you is a complete moron who can confirm - after, installing the WDK with VC2003 as Tril posted, I was able to compile AND run successfully the KX demo plugin. And if I can do it - pfff....
Well Md6, if you are a complete moron, I am afraid that some of us are sub-idiots because I don't even know what you are talking about.

I guess I will have to go back to the beginning and see if I can figure out any of this type of programming.

My only programming experience is AutoLISP and a smidgeon of visual basic. I don't know if any of that will even help me at all. But if I give this a try, it should move you up the ranks from moron to beginner, I will assume the moron position and scrub the kX toilets on the night shift.
Doug W is offline   Reply With Quote
Old Apr 19, 2007, 01:18 AM   #14
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,836
Rep Power: 41
Russ is a jewel in the roughRuss is a jewel in the roughRuss is a jewel in the rough

Here is some updated info:

The WDK link has been moved, so it seems it is not so easy to get now (although it can be found elsewhere on the web).

In any case it should not be needed. The Windows Server 2003 SP1 DDK should also work, and it is only 236MB (as opposed to 2.4 gigabytes).

Install the DDK:

The minimum options to install:
Windows Driver Development Kit Common Headers
Windows Driver Development Kit Required Build Tools
Anything else is optional.

Add the WINDDK\3790.1830\inc\mfc42 folder to the list of includes (at the top) in VC.
Add the WINDDK\3790.1830\lib\mfc\i386 folder to the list of libraries (at the top) in VC.

Tested with MS Visual Studio .NET 2003.

-Russ

Last edited by Russ; Apr 19, 2007 at 01:23 AM.
Russ is online now   Reply With Quote
Old Aug 5, 2008, 05:19 PM   #15
DriverHeaven Junior Member
 
Join Date: Jan 2006
Posts: 28
Rep Power: 0
zaboomafoo is on a distinguished road

kx gui classes - reference

Hello,

Is there any document or thread here ini the forum or anywhere else which gives some details about the kx gui classes (kKnob, kPeak, kSlider, ...) and functions (create_vfader, ...)?

I am looking at the header files and provided source code. Many of the gui classes are not used in the sources and header files don't have any comments .

Regards,
Frank
zaboomafoo is offline   Reply With Quote
Old Aug 5, 2008, 08:55 PM   #16
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by zaboomafoo View Post
Is there any document or thread here ini the forum or anywhere else which gives some details about the kx gui classes (kKnob, kPeak, kSlider, ...) and functions (create_vfader, ...)?Frank
No, there are no such documents.
Quote:
Originally Posted by zaboomafoo View Post
I am looking at the header files and provided source code. Many of the gui classes are not used in the sources and header files don't have any comments .
But most gui classes *are* used in the sources.
Besides, the class member function names in the headers (should) more or less speak for themself.
FYI; kx gui classes are subclassed MFC controls so it shouldn't be to hard to figure out how they work.
Else, just ask here.

Cheers.

Last edited by Lex Nahumury; Aug 6, 2008 at 10:12 AM. Reason: typo
Lex Nahumury is offline   Reply With Quote
Old Aug 5, 2008, 11:49 PM   #17
DriverHeaven Junior Member
 
Join Date: Jan 2006
Posts: 28
Rep Power: 0
zaboomafoo is on a distinguished road

Thanks for the reply.

I shouldn't have said "most of" ... but some of the controls are not used in the sample sources. I am not able to find an example of using kKnob class. Actually I have no idea how it is supposed to look like. Is there a plugin somewhere that uses this class?

I tried this:

Code:
 
    // kKnob test
    knob = new kKnob;
    knob->Size.init(50,50);
    knob->create(0, 4, 4, this, KNOB_ID, 0, 100, -150, 300);
    knob->set_pos(20);
    knob->show();
but nothing shows in the plugin window at position 4,4.

Anybody has some sample code that uses this control?

Regards,
Frank
zaboomafoo is offline   Reply With Quote
Old Aug 6, 2008, 10:01 AM   #18
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

That is correct, kKnob is a non-functional control.
IIRC it's only a draft. It never got finished.

Last edited by Lex Nahumury; Aug 6, 2008 at 10:14 AM. Reason: corr.
Lex Nahumury is offline   Reply With Quote
Old May 9, 2009, 12:15 AM   #19
DriverHeaven Newbie
 
Join Date: May 2009
Posts: 10
Rep Power: 0
havvesom is on a distinguished road

Re: kX Project SDK and development

thanks.But Im more interested in the ability to import KX lib into other languages that are at least within my comprehension level - like FreeBasic or PureBasic. Which, can import C++ libs (in purebasic AFAIK)- but the name mangling need 'conversion' or something like that - But I was told the original SDK could be exported or wrapped in VC to allow more easier import... I most certainly could be (probably) confused in this






________________________________________________
http://doiop.com/7283.jpghttp://doiop.com/7282.jpghttp://doiop.com/7281.jpghttp://doiop.com/7280.jpghttp://doiop.com/7279.jpghttp://doiop.com/7278.jpghttp://doiop.com/7277.jpghttp://doiop.com/7276.jpghttp://doiop.com/7275.jpghttp://doiop.com/7274.jpg
havvesom is offline   Reply With Quote
Reply

Bookmarks

Thread Tools