Tony,
Thanks again for you help in finding a good repro for this problem. I opened a case with Microsoft support for the bug and they have confirmed it.
They will probably create a Hotfix for it, i will let you know when it is available if you want so you can request it also.
Thank again.
>Hi Stephane,
>
>I create a prg from your solution, it create all the necessary procedure in the baseclass.
>
>DEFINE CLASS MySession AS Session
>*** Do Not Remove ***
>EndDefine
>
>CLEAR
>CLOSE ALL
>cDefaultPath = [Default Path]
>fBaseClass = [BaseClass.PRG]
>cProjectName = [Project Name]
>cDllFileName = [Dll File Name]
>
>SET DEFAULT TO &cDefaultPath
>CREATE CURSOR ProcName (Prg C(20), ProcName M)
>INDEX ON LEFT(ProcName, 50) TAG ProcN
>MODIFY PROJECT &cProjectName NOWAIT NOSHOW NOPROJECTHOOK
>FOR nIndex = 1 TO _VFP.ActiveProject.Files.Count
> DO CASE
> CASE _VFP.ActiveProject.Files.Item(nIndex).Type # "P"
> CASE fBaseClass $ _VFP.ActiveProject.Files.Item(nIndex).Name
> cbaseclass = FILETOSTR(_VFP.ActiveProject.Files.Item(nIndex).Name)
> OTHERWISE
> cFile = CHRTRAN(FILETOSTR(_VFP.ActiveProject.Files.Item(nIndex).Name), CHR(9), "")
> IF "OLEPUBLIC" $ cFile
> ALINES(aFile, cFile, .T., CHR(10))
> nFound = ASCAN(aFile, "PROCEDURE")
> DO WHILE nFound # 0
> aFile[nFound] = ALLTRIM(aFile[nFound])
> IF RIGHT(aFile[nFound], 1) = ";"
> cProcLine = aFile[nFound]
> DO WHILE RIGHT(aFile[nFound], 1) = ";" AND nFound # ALEN(aFile, 1)
> IF nFound # ALEN(aFile, 1)
> nFound = nFound + 1
> aFile[nFound] = ALLTRIM(aFile[nFound])
> cProcLine = cProcLine + " " + aFile[nFound]
> ENDIF
> ENDDO
> cProcLine = CHRTRAN(cProcLine, ";", "")
> ELSE
> cProcLine = aFile[nFound]
> ENDIF
> INSERT INTO ProcName VALUES ;
> (JUSTFNAME(_VFP.ActiveProject.Files.Item(nIndex).Name), cProcLine)
> nFound = ASCAN(aFile, "PROCEDURE", nFound+1)
> ENDDO
> ENDIF
> ENDCASE
>ENDFOR
>SELECT ProcName
>cReplace = ""
>SCAN
> cReplace = cReplace ;
> + CHR(9) ;
> + ALLTRIM(STRTRAN(ProcName, STREXTRACT(ProcName, "(", ")"), "")) ;
> + CHR(13) + CHR(10)
>ENDSCAN
>TRY
> SET SAFETY OFF
> STRTOFILE(STRTRAN(cbaseclass, "*** Do Not Remove ***", cReplace), fBaseClass, 0)
> SET SAFETY ON
> _VFP.ActiveProject.Close
> BUILD MTDLL &cDllFileName FROM &cProjectName
> MODIFY PROJECT &cProjectName NOWAIT NOSHOW NOPROJECTHOOK
>CATCH TO oErr
> ? oErr.Message
>FINALLY
> SET SAFETY OFF
> STRTOFILE(cbaseclass, fBaseClass, 0)
> SET SAFETY ON
>ENDTRY
>MODIFY PROJECT &cProjectName NOWAIT
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only