Bug #12925: PHP could not pass binary string to COM

From: Date: Thu, 23 Aug 2001 15:02:50 +0000
Subject: Bug #12925: PHP could not pass binary string to COM
Groups: php.dev 
Request: Send a blank email to php-dev+get-64165@lists.php.net to get a copy of this message
From: bin.yang@daytonrcs.com Operating system: W2K pro PHP version: 4.0.6 PHP Bug Type: COM related Bug description: PHP could not pass binary string to COM Here is the PHP code. $bp = new COM("AG2.Beepoj") or die("Unable to instanciate"); $bp-> beeeep(101,"\x0\x0\xff"); unset($bp); The other end is a COM object, the beeeep method defined as STDMETHODIMP Cbeepoj::Beeeep(int iDuration, BSTR b_str) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) // TODO: Add your implementation code here ::Beep(523,iDuration); if(wcslen(b_str)!=0) AfxMessageBox((CString)b_str); else AfxMessageBox("null string."); return S_OK; } If I use $bp-> beeeep(101,"111111"); I will get 111111 displayed in a message box. However, If the input is $bp-> beeeep(101,"\x0\x0\xff"); The COM will say it is a null string. -- Edit bug report at: http://bugs.php.net/?id=12925&edit=1

« previous php.dev (#64165) next »