VB.NET application crashes getting DeviceID

I am using the XEM3001.

I have a VB.NET application running in Windows 7 x64 operating system. The call to my other okUsbFrontPanel functions work but when I try to get the Device ID the application crashes and I get no exception error.

Public Class CTMobject
Private Declare Function okUsbFrontPanel_GetDeviceID Lib “okFrontPanel” (ByVal xem As Integer, ByVal buf As String) As String
Dim s As String = String.Empty
s = Space(100) 'reserve more space than needed
okUsbFrontPanel_GetDeviceID(_xem, s)

any thoughts about what could be happening?
I have tried both Microsoft Visual Studio 2008 and 2010.