Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 11:32

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Rel] Rappelz RDB Library (beta)

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
[Rel] Rappelz RDB Library (beta)

This library allow converting any format in any other format where compatibles formats are RDB, CSV, SQL (Supported SQL servers: MS SQLServer and PosgreSQL)

To use it, create a ExternDescriptedDatabase object with the db description DLL name in parameter: for example: new ExternDescriptedDatabase("StringDatabase.dll");

then use database provided functions readData(...) and writeData(...)

(only source parameter is used when dealing with RDB and CSV files, for SQL, location = odbc DSN, user = user and password = password )

for CSV, when passing the source named "con", it will use standard input/output (for ex: writeData(Database:: DST_CSV, "con"); will print database content on console screen)

you can provide a callback function to show a progress bar for example with the third argument of writeData and readData (pass NULL if you don't to use this feature)

to get the contents of the database, use getRows(); from Database, it return a vector containing void** values, use a RowManipulator class to manage rows (for a row named void **theRow, use setCurrentRow(theRow); )
you can retreive pointer to data with getValuePtr().

types and ignore flags are declared in DataType.h.

[EDIT]: Use the updated version

virustotal scan:
Attached Files
File Type: zip RappelzRDBLib.zip (463.8 KB, 1034 views)



glandu2 is offline  
Thanks
11 Users
Old   #2
 
elite*gold: 1
Join Date: Nov 2011
Posts: 651
Received Thanks: 104
Another usefull release ^^
can share?


Tofrum is offline  
Old   #3
 
elite*gold: 0
Join Date: Mar 2012
Posts: 200
Received Thanks: 23
Great man
AngelOwns is offline  
Old   #4
 
elite*gold: 0
Join Date: Aug 2012
Posts: 22
Received Thanks: 2
how i can make menu on it?
i have autoit ; builder c ++ ; visual studio 2012 .. what i need ?

Quote:
Originally Posted by glandu2 View Post
This library allow converting any format in any other format where compatibles formats are RDB, CSV, SQL (Supported SQL servers: MS SQLServer and PosgreSQL)

To use it, create a ExternDescriptedDatabase object with the db description DLL name in parameter: for example: new ExternDescriptedDatabase("StringDatabase.dll");

then use database provided functions readData(...) and writeData(...)

(only source parameter is used when dealing with RDB and CSV files, for SQL, location = odbc DSN, user = user and password = password )

for CSV, when passing the source named "con", it will use standard input/output (for ex: writeData(Database:: DST_CSV, "con"); will print database content on console screen)

you can provide a callback function to show a progress bar for example with the third argument of writeData and readData (pass NULL if you don't to use this feature)

to get the contents of the database, use getRows(); from Database, it return a vector containing void** values, use a RowManipulator class to manage rows (for a row named void **theRow, use setCurrentRow(theRow); )
you can retreive pointer to data with getValuePtr().

types and ignore flags are declared in DataType.h.

virustotal scan:




can upload screen shot please your exemple ?

Hi glandu2,

was up ? :-)

I want to test your dll and my visual studio C# project is not acccepting them ...

Maybe it's not in C# but another one ?
Can you help me please ?

Thanks a lot for helping and for the code :-)

Cheers.

SarahBlue


Sarahblue is offline  
Old   #5
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
if you want to use c#, you will have to make a managed wrapper as explained

for the screen, the attached image show my current program using this library

PS: because of this showing that people have no respect to devs who make programs and rerelease programs as their own (don't know if SarahBlue == bloodblade),
i will not explain how to make this program lines by lines, use your imagination and intelligence to do it (if some tips is need, i will still give some information)

@[Co-Admin]Tofrum you can share but this thread link, no re-upload
Attached Images
File Type: jpg screen.jpg (33.9 KB, 381 views)
glandu2 is offline  
Thanks
7 Users
Old   #6
 
elite*gold: 0
Join Date: Apr 2010
Posts: 389
Received Thanks: 289
Quote:
Originally Posted by glandu2 View Post
if you want to use c#, you will have to make a managed wrapper as explained

for the screen, the attached image show my current program using this library

PS: because of this showing that people have no respect to devs who make programs and rerelease programs as their own (don't know if SarahBlue == bloodblade),
i will not explain how to make this program lines by lines, use your imagination and intelligence to do it (if some tips is need, i will still give some information)

@[Co-Admin]Tofrum you can share but this thread link, no re-upload

well , i can't say no it's your decision
but i have a smal question
if i don't know anything about c++ () , you think i can create this program using guides on google and those files ?
if yes then i would start right now
Strange2010 is offline  
Old   #7
 
elite*gold: 0
Join Date: May 2011
Posts: 139
Received Thanks: 12
Thanks
and can I get the record of these rdb files
because I don't know c++ and I want to make my own tool using another language
diaa yousef is offline  
Thanks
1 User
Old   #8
 
elite*gold: 0
Join Date: Nov 2011
Posts: 136
Received Thanks: 61
Quote:
Originally Posted by diaa yousef View Post
Thanks
and can I get the record of these rdb files
because I don't know c++ and I want to make my own tool using another language
Me too
Can you give it to us ?
5405045 is offline  
Old   #9
 
elite*gold: 0
Join Date: Jul 2011
Posts: 264
Received Thanks: 233
i know how to import unmaneged DLL to VB & C# project but i don't know what

function should i use yo open RDB file with it
M>M is offline  
Thanks
1 User
Old   #10
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
Quote:
Originally Posted by Strange2010 View Post
well , i can't say no it's your decision
but i have a smal question
if i don't know anything about c++ () , you think i can create this program using guides on google and those files ?
if yes then i would start right now
You are not forced to use C++, you can use another language (for this you have to use my update, else name mangling will cause problems), i use QT to make the gui, which makes gui programming in C++ a lot easier, actually, i have like 500 lines (more or less) of code to manage this GUI

Quote:
Originally Posted by diaa yousef View Post
Thanks
and can I get the record of these rdb files
because I don't know c++ and I want to make my own tool using another language
No sorry, as in fact, finding rdb structure is the most annoying/long part of this release, so i prefer keep my long work no available ^^

Quote:
Originally Posted by M>M View Post
i know how to import unmaneged DLL to VB & C# project but i don't know what

function should i use yo open RDB file with it
in the update, i added comments in *DLLWrapper.h, ask for more information if you want

Use example:
This example will open a string database from RDB file "db_string.rdb" and save it to the SQL server table named "dbo.sqltablesample" using "SQLEXPRESS" odbc source and username "sa"
Code:
Database *db = new Database("StringDatabase.dll");
db->readData(DST_RDB, "db_string.rdb");   //we leave others parameter to NULL value (0), same as db->readData(DST_RDB, "db_string.rdb", NULL, NULL, NULL, NULL);
db->writeData(DST_SQL, "dbo.sqltablesample", NULL, "SQLEXPRESS", "sa", "");
db->close(NULL);  //not needed, "delete db" will do it anyway
delete db;
DST_RDB and DST_SQL (and other constants) are defined in DataType.h

To use this library in other languages, you will have to define these constant in your language (or use directly associated integers)

Here is some link to use the library with other language:
C#: PDF About calling C DLL in C#
VB:
VB.net:

an example: to test dll importation in C#, i used this code:
Code:
[DllImport("RpzRdbBase.dll")]
public static extern IntPtr createDLLDatabaseInstance(StringBuilder dllname);
[DllImport("RpzRdbBase.dll")]
public static extern void destroyDatabase(IntPtr ptr);
[DllImport("RpzRdbBase.dll")]
public static extern int readDataDatabase(IntPtr db, int type, StringBuilder source, IntPtr progressCallBack, StringBuilder location, StringBuilder user, StringBuilder password);
Attached Files
File Type: zip RappelzRDBLib.zip (668.3 KB, 303 views)
glandu2 is offline  
Thanks
4 Users
Old   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
as i received severals mp about using these dll in c#, i will explain some things about (i never used c# before that, or just a little so if i don't use the right classes, don't blame me )


An example of how to use function to get something working:
Code:
            try
            {
                Database db = new Database("StringDatabase.dll");
                RowManipulator row;

                db.readData(eDataSourceType.DST_RDB, "db_string.rdb", "", "", "");
                row = db.getRowManipulator();

                for (int i = 0; i < db.getRowCount(); i++)
                {
                    row.setCurrentRow(db.getRowAt(i));
                    for (int j = 0; j < row.getColumnCount(); j++)
                        Console.Write(row.getValue(j) + "\t");
                    Console.Write(Environment.NewLine);
                }
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.ToString());
                return;
            }
            Console.WriteLine("ok");
here i use Database and RowManipulator classes, i reimplemented them using *DLLWrapper.h, it's just translating code to c# (and add [Dllimport("RpzRdbBase.dll")] to import C function, as declared in InterfaceFunctions.h, void* pointers become IntPtr, char* pointers become StringBuilder)

for the getValue function, i made a switch of the type of the field to know what is the return value of the getValuePtrRowManipulator function as it is a pointer

if it's not a array, you have to dereference the pointer with the type of the value (for example, if the field is of type int, getValuePtrRowManipulator will return in fact a int* pointer, so to get the integer, you have to dereference it)

for array, like strings, i used the Marshal class with PtrToStringAnsi to convert the char* pointer to string

i never made a c# program before this, i think you will have better ideas than me at using .net framework classes ^^

(fo dereferencing pointer, i had to use unsafe code and activate a checkbox about that in project options)
(the TYPE_VARCHAR_SIZE should not be printed on screen as it's just a way to know the string size in the rdb file, if you need it, use it as if it were a TYPE_INT32 value)

A table about what's the real return type of getValuePtrRowManipulator():
BIT and INT8: char* (in c#, byte is better i think as a char in c# is a unicode char, not an integer)
INT16: short*
INT32: int*
INT64: long long* (if i remember correctly, in c# the 64 bit type is only "long")
FLOAT32: float*
FLOAT64: double*

these two type are in fact strings, use getDataCount to get actual array size (that is char_num -1 because of the terminating \0)
CHAR: char*
VARCHAR_STR: char*

VARCHAR_SIZE: int* (special type here, it contain the actual size of VARCHAR_STR, you should not modify it, use setDataCountRowManipulator instead)

although BIT, INT8, INT16 or smaller than a int, you can use them as if they was all INT32 (but if you set a too big value in them, writing will truncate the value)
glandu2 is offline  
Old   #12
 
elite*gold: 0
Join Date: Nov 2011
Posts: 136
Received Thanks: 61
Quote:
Originally Posted by glandu2 View Post
as i received severals mp about using these dll in c#, i will explain some things about (i never used c# before that, or just a little so if i don't use the right classes, don't blame me )


An example of how to use function to get something working:
Code:
            try
            {
                Database db = new Database("StringDatabase.dll");
                RowManipulator row;

                db.readData(eDataSourceType.DST_RDB, "db_string.rdb", "", "", "");
                row = db.getRowManipulator();

                for (int i = 0; i < db.getRowCount(); i++)
                {
                    row.setCurrentRow(db.getRowAt(i));
                    for (int j = 0; j < row.getColumnCount(); j++)
                        Console.Write(row.getValue(j) + "\t");
                    Console.Write(Environment.NewLine);
                }
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.ToString());
                return;
            }
            Console.WriteLine("ok");
here i use Database and RowManipulator classes, i reimplemented them using *DLLWrapper.h, it's just translating code to c# (and add [Dllimport("RpzRdbBase.dll")] to import C function, as declared in InterfaceFunctions.h, void* pointers become IntPtr, char* pointers become StringBuilder)

for the getValue function, i made a switch of the type of the field to know what is the return value of the getValuePtrRowManipulator function as it is a pointer

if it's not a array, you have to dereference the pointer with the type of the value (for example, if the field is of type int, getValuePtrRowManipulator will return in fact a int* pointer, so to get the integer, you have to dereference it)

for array, like strings, i used the Marshal class with PtrToStringAnsi to convert the char* pointer to string

i never made a c# program before this, i think you will have better ideas than me at using .net framework classes ^^

(fo dereferencing pointer, i had to use unsafe code and activate a checkbox about that in project options)
(the TYPE_VARCHAR_SIZE should not be printed on screen as it's just a way to know the string size in the rdb file, if you need it, use it as if it were a TYPE_INT32 value)

A table about what's the real return type of getValuePtrRowManipulator():
BIT and INT8: char* (in c#, byte is better i think as a char in c# is a unicode char, not an integer)
INT16: short*
INT32: int*
INT64: long long* (if i remember correctly, in c# the 64 bit type is only "long")
FLOAT32: float*
FLOAT64: double*

these two type are in fact strings, use getDataCount to get actual array size (that is char_num -1 because of the terminating \0)
CHAR: char*
VARCHAR_STR: char*

VARCHAR_SIZE: int* (special type here, it contain the actual size of VARCHAR_STR, you should not modify it, use setDataCountRowManipulator instead)

although BIT, INT8, INT16 or smaller than a int, you can use them as if they was all INT32 (but if you set a too big value in them, writing will truncate the value)
can't you just give us the full program ?
every body is selling it for 10$ anyway
5405045 is offline  
Old   #13
 
elite*gold: 0
Join Date: Jul 2011
Posts: 264
Received Thanks: 233
Quote:
Originally Posted by 5405045 View Post
can't you just give us the full program ?
every body is selling it for 10$ anyway
he can't make it because he don't know C# and if he made it on C++ we will not
understand any thin from it
M>M is offline  
Old   #14
 
elite*gold: 0
Join Date: Jul 2012
Posts: 44
Received Thanks: 14
dont need buy.. here you have file db_xxx =)
prodx is offline  
Old   #15
 
elite*gold: 0
Join Date: Nov 2011
Posts: 136
Received Thanks: 61
Quote:
Originally Posted by prodx View Post
dont need buy.. here you have file db_xxx =)
-_- why would i need the rdbs when i can extract them my self ??


5405045 is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
[Patch for Beta] Error with C++ library
Hi Since the mirrors to get the patch from webzen doesnt work all the item i uploaded the file to my fileserve account If you need it download it...
0 Replies - Archlord



All times are GMT +2. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.