Hi,
I attach a very much work-in-progress version of a program which can generate INI .ini and resource .rc files parsing your YourProcedures.pb file - you can then include the .rc when compiling the raw .dll in purebasic before you run PPFixer on it...
you can use the ini file in keywords in dbpro - by default the ini will include the pp initialized() command... you dont want that line though in two or more ini files in editor\keywords.
The only addition then is you need to put in ;[parameters],[and then the parameters in your command ie. oldstring,string,integer,integer] after the ProcedureCDLL line in the purebasic YourProcedures code and - dont forget to include oldstring as a parameter even if you're not going to see that parameter in the final command accessible by DBPro - also ;[return],and then put the variable type returned - ie. string, integer, float - after the final ProcedureReturn line in the procedure in pb but before the EndProcedure line.... if your purebasic procedurecdll is actually going to give a returable variable.
Where you are looking to generate a function type command with no incoming variable you can put ";[parameters],nowt" but don't forget to include the oldstring parameter in that line if you are not putting any parameters in to a function type command but do want a string out of it...
in your YourProcedures.pb file which you are parsing you could create a procedure like say ProcedureCDLL DF_TEST_COMMAND() - in the generated .rc resource file parsed from that it will ignore the underlines - and so the end command as seen in the .rc at the start of each line and in the .ini keywords file would be "DF TEST COMMAND" with no underlines....
Hopefully this makes some sort of sense to people who are/have used pureplugin and purebasic....
anyway here is some example purebasic YourProcedure code to give you an idea of how you have to remark your pb code to make this program work:-
ProcedureCDLL.l DF_TABLE_EXIST(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)Populated
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE()
;[parameters],nowt
result.l = CurrentTable
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_TOTAL_NUMBER_OF_ACTIVE_TABLES()
;[parameters],nowt
result.l = TotalNumberOfActiveTables
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_FREE_TABLE()
;[parameters],nowt
i.l = 1
a.l = 0
Repeat
a = SimpleTableInfo(i)Populated
If DBFileOpen(i)=0
found.l=1
EndIf
i=inc(i,1)
Until found = 1 Or i > 10
If i > 9
i = -1
EndIf
inc(i,1)
ProcedureReturn i
;[return],integer
EndProcedure
ProcedureCDLL.l DF_IS_SPECIFIED_TABLE_DELETED(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)Deleted
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_IS_SPECIFIED_TABLE_THE_CURRENT_ONE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)Current
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_TABLE_HAVE_LOADED_IN_DATA(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)Loaded
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_TABLE_HAVE_FILE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)File
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_TABLE_HAVE_FIRST_ROW_AS_HEADER(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)FirstRowAsHeader
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_TABLE_HAVE_FIRST_COLUMN_AS_HEADER(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)FirstColumnAsHeader
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_CURRENT_TABLE_HAVE_FIRST_ROW_AS_HEADER()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)FirstRowAsHeader
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_DOES_CURRENT_TABLE_HAVE_FIRST_COLUMN_AS_HEADER()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)FirstColumnAsHeader
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_MAXIMUM_ROWS()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)MaximumRows
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_MAXIMUM_COLUMNS()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)MaximumColumns
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_CURRENT_ROW()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)CurrentRow
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_CURRENT_COLUMN()
;[parameters],nowt
result.l = SimpleTableInfo(CurrentTable)CurrentColumn
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_MAXIMUM_ROWS(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)MaximumRows
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_MAXIMUM_COLUMNS(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)MaximumColumns
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_CURRENT_ROW(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)CurrentRow
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_CURRENT_COLUMN(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
result.l = SimpleTableInfo(TableID)CurrentColumn
ProcedureReturn result
;[return],integer
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_NAME(OldString.l)
;[parameters],oldstring
If OldString <> 0
CallCFunctionFast( *GlobPtrCreateDeleteString, OldString , 0 )
EndIf
result.s = SimpleTableInfo(CurrentTable)Name
CallCFunctionFast(*GlobPtrCreateDeleteString, @temp.l , Len( result ) + 1 )
PokeS( temp , result )
ProcedureReturn temp
;[return],string
EndProcedure
ProcedureCDLL.l DF_GET_CURRENT_TABLE_FILE_NAME(OldString.l)
;[parameters],oldstring
If OldString <> 0
CallCFunctionFast( *GlobPtrCreateDeleteString, OldString , 0 )
EndIf
result.s = SimpleTableInfo(CurrentTable)FileName
CallCFunctionFast(*GlobPtrCreateDeleteString, @temp.l , Len( result ) + 1 )
PokeS( temp , result )
ProcedureReturn temp
;[return],string
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_NAME(OldString.l, TableID.l)
;[parameters],oldstring,integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If OldString <> 0
CallCFunctionFast( *GlobPtrCreateDeleteString, OldString , 0 )
EndIf
result.s = SimpleTableInfo(TableID)Name
CallCFunctionFast(*GlobPtrCreateDeleteString, @temp.l , Len( result ) + 1 )
PokeS( temp , result )
ProcedureReturn temp
;[return],string
EndProcedure
ProcedureCDLL.l DF_GET_TABLE_FILE_NAME(OldString.l,TableID.l)
;[parameters],oldstring,integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If OldString <> 0
CallCFunctionFast( *GlobPtrCreateDeleteString, OldString , 0 )
EndIf
result.s = SimpleTableInfo(TableID)FileName
CallCFunctionFast(*GlobPtrCreateDeleteString, @temp.l , Len( result ) + 1 )
PokeS( temp , result )
ProcedureReturn temp
;[return],string
EndProcedure
ProcedureCDLL DF_SET_CURRENT_TABLE_NAME(NewName.l)
;[parameters],string
NewNameTrue.s = PeekS(NewName)
If SimpleTableInfo(CurrentTable)Populated > 0 And NewNameTrue <> ""
SimpleTableInfo(CurrentTable)Name = NewNameTrue
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_SET_CURRENT_TABLE_FILE_NAME(NewFileName.l)
;[parameters],string
NewFileNameTrue.s = PeekS(NewFileName)
If SimpleTableInfo(CurrentTable)Populated > 0 And NewFileNameTrue <> ""
SimpleTableInfo(CurrentTable)FileName = NewFileNameTrue
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_SET_TABLE_NAME(TableID.l, NewName.l)
;[parameters],integer,string
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
NewNameTrue.s = PeekS(NewName)
If SimpleTableInfo(TableID)Populated > 0 And NewNameTrue <> ""
SimpleTableInfo(TableID)Name = NewNameTrue
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_SET_TABLE_FILE_NAME(TableID.l, NewFileName.l)
;[parameters],integer,string
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
NewFileNameTrue.s = PeekS(NewFileName)
If SimpleTableInfo(TableID)Populated > 0 And NewFileNameTrue <> ""
SimpleTableInfo(TableID)FileName = NewFileNameTrue
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_DELETE_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Populated > 0 And SimpleTableInfo(TableID)Deleted = 0
SimpleTableInfo(TableID)Deleted = 1
dec(TotalNumberOfActiveTables,1)
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_UTTER_DELETE_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Populated > 0
imaxrows.l = SimpleTableInfo(TableID)MaximumRows
imaxcolumns.l = SimpleTableInfo(TableID)MaximumColumns
SimpleTableInfo(TableID)MaximumRows = 1
SimpleTableInfo(TableID)MaximumColumns = 1
For rowrow = 1 To imaxrows
For colcol = 1 To imaxcolumns
DetailedTableInfo(TableID,rowrow,colcol)Header = 0
DetailedTableInfo(TableID,rowrow,colcol)Key = ""
DetailedTableInfo(TableID,rowrow,colcol)Description = ""
DetailedTableInfo(TableID,rowrow,colcol)Value = ""
DetailedTableInfo(TableID,rowrow,colcol)ValueType = ""
DetailedTableInfo(TableID,rowrow,colcol)MaskValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MinimumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MaximumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)DefaultValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)CalculusValue = ""
Next colcol
Next rowrow
SimpleTableInfo(TableID)Populated = 0
SimpleTableInfo(TableID)Deleted = 0
SimpleTableInfo(TableID)Loaded = 0
SimpleTableInfo(TableID)Created = 0
SimpleTableInfo(TableID)Name = ""
SimpleTableInfo(TableID)FileName = ""
SimpleTableInfo(TableID)Current = 0
SimpleTableInfo(TableID)File = 0
SimpleTableInfo(TableID)FirstRowAsHeader = 0
SimpleTableInfo(TableID)FirstColumnAsHeader = 0
SimpleTableInfo(TableID)MaximumRows = 1
SimpleTableInfo(TableID)MaximumColumns = 1
SimpleTableInfo(TableID)CurrentRow = 1
SimpleTableInfo(TableID)CurrentColumn = 1
dec(TotalNumberOfActiveTables,1)
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_UTTER_DELETE_CURRENT_TABLE()
;[parameters],nowt
If SimpleTableInfo(CurrentTable)Populated > 0
imaxrows.l = SimpleTableInfo(CurrentTable)MaximumRows
imaxcolumns.l = SimpleTableInfo(CurrentTable)MaximumColumns
SimpleTableInfo(CurrentTable)MaximumRows = 1
SimpleTableInfo(CurrentTable)MaximumColumns = 1
For rowrow = 1 To imaxrows
For colcol = 1 To imaxcolumns
DetailedTableInfo(CurrentTable,rowrow,colcol)Header = 0
DetailedTableInfo(CurrentTable,rowrow,colcol)Key = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)Description = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)Value = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)ValueType = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MaskValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MinimumValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MaximumValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)DefaultValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)CalculusValue = ""
Next colcol
Next rowrow
dec(TotalNumberOfActiveTables,1)
SimpleTableInfo(CurrentTable)Populated = 0
SimpleTableInfo(CurrentTable)Deleted = 0
SimpleTableInfo(CurrentTable)Loaded = 0
SimpleTableInfo(CurrentTable)Created = 0
SimpleTableInfo(CurrentTable)Name = ""
SimpleTableInfo(CurrentTable)FileName = ""
SimpleTableInfo(CurrentTable)Current = 0
SimpleTableInfo(CurrentTable)File = 0
SimpleTableInfo(CurrentTable)FirstRowAsHeader = 0
SimpleTableInfo(CurrentTable)FirstColumnAsHeader = 0
SimpleTableInfo(CurrentTable)MaximumRows = 1
SimpleTableInfo(CurrentTable)MaximumColumns = 1
SimpleTableInfo(CurrentTable)CurrentRow = 1
SimpleTableInfo(CurrentTable)CurrentColumn = 1
dec(TotalNumberOfActiveTables,1)
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_UNDELETE_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Deleted = 1 And SimpleTableInfo(TableID)Populated > 0
SimpleTableInfo(TableID)Deleted = 0
inc(TotalNumberOfActiveTables,1)
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_CLEAR_AND_RESET_ALL_TABLES()
;[parameters],nowt
Dim SimpleTableInfo.TableData(10)
Dim SimpleTableInfoBackup.TableData(10)
Dim DetailedTableInfo.CellData(10,1,1)
Dim DetailedTableInfoBackup.CellData(10,1,1)
CurrentTable = -1
MaximumRowsInAnyTable = 1
MaximumColumnsInAnyTable = 1
TotalNumberOfActiveTables = 0
;[return],nowt
EndProcedure
ProcedureCDLL DF_CLEAR_AND_RESET_CURRENT_TABLE()
;[parameters],nowt
If SimpleTableInfo(CurrentTable)Populated > 1
imaxrows.l = SimpleTableInfo(CurrentTable)MaximumRows
imaxcolumns.l = SimpleTableInfo(CurrentTable)MaximumColumns
SimpleTableInfo(CurrentTable)MaximumRows = 1
SimpleTableInfo(CurrentTable)MaximumColumns = 1
SimpleTableInfo(CurrentTable)CurrentRow = 1
SimpleTableInfo(CurrentTable)CurrentColumn = 1
SimpleTableInfo(CurrentTable)FirstRowAsHeader = 0
SimpleTableInfo(CurrentTable)FirstRowAsHeader = 0
For rowrow = 1 To imaxrows
For colcol = 1 To imaxcolumns
DetailedTableInfo(CurrentTable,rowrow,colcol)Header = 0
DetailedTableInfo(CurrentTable,rowrow,colcol)Key = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)Description = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)Value = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)ValueType = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MaskValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MinimumValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)MaximumValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)DefaultValue = ""
DetailedTableInfo(CurrentTable,rowrow,colcol)CalculusValue = ""
Next colcol
Next rowrow
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_CLEAR_AND_RESET_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Populated > 1
imaxrows.l = SimpleTableInfo(TableID)MaximumRows
imaxcolumns.l = SimpleTableInfo(TableID)MaximumColumns
SimpleTableInfo(TableID)MaximumRows = 1
SimpleTableInfo(TableID)MaximumColumns = 1
SimpleTableInfo(TableID)CurrentRow = 1
SimpleTableInfo(TableID)CurrentColumn = 1
SimpleTableInfo(TableID)FirstRowAsHeader = 0
SimpleTableInfo(TableID)FirstRowAsHeader = 0
For rowrow = 1 To imaxrows
For colcol = 1 To imaxcolumns
DetailedTableInfo(TableID,rowrow,colcol)Header = 0
DetailedTableInfo(TableID,rowrow,colcol)Key = ""
DetailedTableInfo(TableID,rowrow,colcol)Description = ""
DetailedTableInfo(TableID,rowrow,colcol)Value = ""
DetailedTableInfo(TableID,rowrow,colcol)ValueType = ""
DetailedTableInfo(TableID,rowrow,colcol)MaskValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MinimumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MaximumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)DefaultValue = ""
DetailedTableInfo(TableID,rowrow,colcol)CalculusValue = ""
Next colcol
Next rowrow
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_SET_CURRENT_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Populated > 0 And SimpleTableInfo(TableID)Deleted = 0
SimpleTableInfo(TableID)Current = 1
CurrentTable = TableID
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_GO_TO_TABLE(TableID.l)
;[parameters],integer
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If SimpleTableInfo(TableID)Populated > 0 And SimpleTableInfo(TableID)Deleted = 0
SimpleTableInfo(TableID)Current = 1
CurrentTable = TableID
EndIf
;[return],nowt
EndProcedure
ProcedureCDLL DF_LOAD_TABLE(TableID.l,TableFileName.l)
;[parameters].integer,string
FName.s = PeekS(TableFileName)
If TableID < 1
TableID = 1
EndIf
If TableID > 10
TableID = 10
EndIf
If OpenFile(1, FName)
If SimpleTableInfo(TableID)Populated < 1
inc(TotalNumberOfActiveTables,1)
EndIf
imaxrows.l = MaximumRowsInAnyTable
imaxcolumns.l = MaximumColumnsInAnyTable
SimpleTableInfo(TableID)MaximumRows = 1
SimpleTableInfo(TableID)MaximumColumns = 1
SimpleTableInfo(TableID)CurrentRow = 1
SimpleTableInfo(TableID)CurrentColumn = 1
SimpleTableInfo(TableID)FirstRowAsHeader = 0
SimpleTableInfo(TableID)FirstRowAsHeader = 0
For rowrow = 1 To imaxrows
For colcol = 1 To imaxcolumns
DetailedTableInfo(TableID,rowrow,colcol)Header = 0
DetailedTableInfo(TableID,rowrow,colcol)Key = ""
DetailedTableInfo(TableID,rowrow,colcol)Description = ""
DetailedTableInfo(TableID,rowrow,colcol)Value = ""
DetailedTableInfo(TableID,rowrow,colcol)ValueType = ""
DetailedTableInfo(TableID,rowrow,colcol)MaskValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MinimumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)MaximumValue = ""
DetailedTableInfo(TableID,rowrow,colcol)DefaultValue = ""
DetailedTableInfo(TableID,rowrow,colcol)CalculusValue = ""
Next colcol
Next rowrow
SimpleTableInfo(TableID)Populated = 1
SimpleTableInfo(TableID)Deleted = 0
SimpleTableInfo(TableID)Loaded = 1
SimpleTableInfo(TableID)Created = 0
SimpleTableInfo(TableID)Name = ""
SimpleTableInfo(TableID)FileName = FName
SimpleTableInfo(TableID)Current = 1
SimpleTableInfo(TableID)File = 1
SimpleTableInfo(TableID)FirstRowAsHeader = 0
SimpleTableInfo(TableID)FirstColumnAsHeader = 0
SimpleTableInfo(TableID)MaximumRows = 1
SimpleTableInfo(TableID)MaximumColumns = 1
SimpleTableInfo(TableID)CurrentRow = 1
SimpleTableInfo(TableID)CurrentColumn = 1
CurrentTable = TableID
version.s
version = ReadString(1)
SimpleTableInfo(TableID)Name = ReadString(1)
SimpleTableInfo(TableID)FirstRowAsHeader = ReadInteger(1)
SimpleTableInfo(TableID)FirstColumnAsHeader = ReadInteger(1)
SimpleTableInfo(TableID)MaximumRows = ReadInteger(1)
SimpleTableInfo(TableID)MaximumColumns = ReadInteger(1)
SimpleTableInfo(TableID)CurrentRow = ReadInteger(1)
SimpleTableInfo(TableID)CurrentColumn = ReadInteger(1)
RelevantTableID.l = TableID
CheckNeedToResizeAllTablesOnLoad(RelevantTableID)
CloseFile(1)
null = OpenFile(1,FName)
version = ReadString(1)
SimpleTableInfo(TableID)Name = ReadString(1)
SimpleTableInfo(TableID)FirstRowAsHeader = ReadInteger(1)
SimpleTableInfo(TableID)FirstColumnAsHeader = ReadInteger(1)
SimpleTableInfo(TableID)MaximumRows = ReadInteger(1)
SimpleTableInfo(TableID)MaximumColumns = ReadInteger(1)
SimpleTableInfo(TableID)CurrentRow = ReadInteger(1)
SimpleTableInfo(TableID)CurrentColumn = ReadInteger(1)
For rr = 1 To SimpleTableInfo(TableID)MaximumRows
For cc = 1 To SimpleTableInfo(TableID)MaximumColumns
DetailedTableInfo(TableID,rr,cc)Header = ReadInteger(1)
DetailedTableInfo(TableID,rr,cc)Key = ReadString(1)
DetailedTableInfo(TableID,rr,cc)Description = ReadString(1)
DetailedTableInfo(TableID,rr,cc)Value = ReadString(1)
DetailedTableInfo(TableID,rr,cc)ValueType = ReadString(1)
DetailedTableInfo(TableID,rr,cc)MaskValue = ReadString(1)
DetailedTableInfo(TableID,rr,cc)MinimumValue = ReadString(1)
DetailedTableInfo(TableID,rr,cc)MaximumValue = ReadString(1)
DetailedTableInfo(TableID,rr,cc)DefaultValue = ReadString(1)
DetailedTableInfo(TableID,rr,cc)CalculusValue = ReadString(1)
Next cc
Next rr
CloseFile(1)
EndIf
;[return],nowt
EndProcedure
excuse my appalling code here - but it gives you an idea of how it works -
the basic idea of this utility is to save you the total slog of doing the .rc file and .ini file as well as doing the cdll procedures in the yourprocedures.pb purebasic file.... saved me huge amounts of time and actually encouraged me to do a huge number of new commands for DBPro for personal use including a WIP v flexible and damn fast database command set....
and here is the attached rar zipped utility in WIP...
it dumps the .ini for DBProEditorKeywords and the .rc resource file for inclusion in the compiled purebasic dll (still needs PPFixer on the dll before it can then be put in the plugins-user DBPro folder) in the same folder as the original YourProcedures.pb file it parses...
[edit] 2.11pm 03/05/2009
Parsing of YourProcedures.pb - but with remarks to assist in parsing correct parameters and any return variable
Creating of DBPro keywords .ini file and .rc PureBasic resource file based upon parsing of YourProcedures.pb
Parsing of YourProcedures.pb without the need to put remarks in .pb file code after ProcedureCDLL lines and ProcedureReturn lines...
Parsing of YourProcedures.pb and/or DBPro Keywords .ini to create draft htm help files for the plugin commands for DBPro...
[edit] 3.33pm 04/05/2009
I have noticed that the parser just couldnt cope with a command type function dragged from the YourProcedures.pb file which had no parameters (and obviously no returned value) and so I made some further amendment.
I also noted that sometimes the stringtable miscalculated and threw in an additional "STRINGTABLE" and an additional "{" line in the resource file (parsed from the YourProcedures.pb file) at the end and I have corrected that to.
I have also added in some messages so I could monitor progress as it parses the YourProcedures.pb file... so far so good (and I've attached now the latest version).
##########################
Footnote
Don't forget to include as an #include file or as a Function or in the code of your main darkbasic file using commands generated with pureplugin lines like:-
null = pp initialized()
null = object exist(2)
null = camera exist(2)
null = light exist(2)
null = sprite exist(2)
null = bitmap exist(2)
null = image exist(2)
null = memblock exist(2)
null = sound exist(2)
null = music exist(2)
mnull$ = mid$("abcd",3)
null = file exist("abcd")
and dont either forget to put the latest pureplugin.dll in your compiler\plugins-user folder in DBPro too...
a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...