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.
how i can make menu on it?
i have autoit ; builder c ++ ; visual studio 2012 .. what i need ?
Quote:
Originally Posted by glandu2
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 ?
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
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
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
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
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#:
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);
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)
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
[Patch for Beta] Error with C++ library 07/21/2011 - Archlord - 0 Replies 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 from.
Free File Hosting, Online Storage & File Upload with FileServe
Cheers
Mac