Full Version: Use a Webcam to capture picture embedded in an Access Record
UtterAccess Forums > Microsoft® Access > Access Forms
beagley
I'm trying to use a Creative VX webcam tied to my access 2007 database and am having trouble converting the code from VB.net to access. I'm relatively new to both access and vb. I found a barebones vb.net application that works sufficiently for what I need, but when bringing that into access I'm struggling to understand the difference between these 2 declaration statements. I am currently using the following fuction now, the original is below. The line that is confusing me is the MarshalAs(UnmanagedType.AsAny)
This is the new declaration
CODE
    Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
        (ByVal hWnd As Integer, ByVal wMsg As Integer, _
        ByVal wParam As Integer, ByVal lParam As Object) As Integer

And here is the old
CODE
'   Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
'       (ByVal hwnd As Integer, ByVal Msg As Integer, _
'       ByVal wParam As Integer, _
'       MarshalAs(UnmanagedType.AsAny) ByVal lParam As Object) As Integer

Any help explaining this to me would be greatly appreciated.
Thanks,
Beagley
rbianco
Not completely on point to your issue, but this link has some useful info as to what the MarshalAs is doing....
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.