API translator - for automated translation of Windows constants Type Definitions and Function definitiond from VB syntax to LB syntax.  It requres thw Win32api.txt file to operate. It may work with other Dll documentation in VB syntax, but this is untested.

I have corrected it as far as I can. There may still be bugs. Some will be due to me, but some will be due to irregularities in the win32api.txt file. Humans put this together after all, and they did not always stick to their own conventions. I have tested the programme out as far as I can, and it seems to be accurate against Alyce's examples in her book, although variable names are sometimes different. 

Where a call in the programme references another item in the win32api, I have flagged this up as a comment. I have found no way to automatically call these references however.

I have included an opportunity to load a different file than win32api.txt, although I have not tested the programme against anything else.

The 'copy' button puts the current entry on the clipboard. However the programme clears each entry each time a new item is selected. It was suggested that the code in the edit box be allowed to accumulate, so it could be copied on bloc into a basic programme. This might be good for the experienced, but perhaps not so good for the relative novice, who might get a lot of unwanted and confuing code in their programme. My suggestion would be to make an intermediate file to paste in to, which then could be studied at liesure. 

Finally, as others have said, this translator is of little value to the programmer who does not understand what the API call, or the Windows constant is doing. Please regard it as providing a first stab at correct coding for any routine, rather than a definative model.

Anyone is free to use this code in their own projects, although I would expect some acknowledgement in documentation. Be aware, though, that there is a great deal of spaghetti under the hood! 


Colin McMurchie

