I get a Syntax Error during compiling when using Call DWord to assign the result directly to a Class Property. Maybe such a thing was never intended to be allowed but I thought that I would report it just in case.
Code:
#Compile Exe #Include "win32api.inc" Declare Function IsXPThemeActive() As Long '' '' clsApplication '' (Main class that controls all other classes) '' Class clsApplication Instance m_IsXPThemeActive As Long '// '// Interface ApplicationInterface: Inherit IUnknown Property Get IsXPThemeActive() As Long Property = m_IsXPThemeActive End Property Property Set IsXPThemeActive( ByVal nValue As Long ) m_IsXPThemeActive = nValue End Property End Interface End Class Global gclsApp As ApplicationInterface '' '' Main program entry point '' Function PBMain() As Long Local hLib As Dword Local pProc As Dword Local nTemp As Long Let gclsApp = Class "clsApplication" hLib = LoadLibrary("UxTheme.dll") If hLib Then pProc = GetProcAddress(hLib, "IsThemeActive") If pProc Then ' Assigning to a temporary variable works perfectly Call Dword pProc Using IsXPThemeActive To nTemp gclsApp.IsXPThemeActive = nTemp ' Trying to assign directly to the Class Property ' causes a Syntax error. Call Dword pProc Using IsXPThemeActive To gclsApp.IsXPThemeActive End If FreeLibrary hLib End If MsgBox "Complete." End Function
Comment