From: Mathias on
Hi,

the string constants does not look right. There's no logic in these
xml looking strings. I think you should check the documentation what
they really should contain. Maybe "updateinfo", "sessioninfo" and
"keyinfo", but this is just me guessing.

Mathias

On 5 Nov, 09:13, "Darmadi" <supp...(a)gfsoftindo.com> wrote:
> Hi again Mathias,
>
> I have modified my code:
>
> ptrVendor := PTR( _CAST, String2Psz( HASP_VENDOR_CODE ) )
>
> dwStatus := HASP_Login( 0 + HASP_PROGNUM_FEATURETYPE, ptrVendor,
> @dwHASPHandle )
>
> IF dwStatus == HASP_STATUS_OK
>
>     pszString := NULL_PSZ
>
>     dwStatus := HASP_Get_Sessioninfo( dwHASPHandle,
> String2Psz(HASP_KEYINFO), @pszString )
>
>     IF dwStatus == HASP_STATUS_OK
>
>          cString := Psz2String(pszString)
>          ErrorBox{SELF,cString}:Show()
>
>      ELSE
>          ErrorBox{SELF,"FAILED!!!"}:Show()
>      ENDI
>
>      hasp_free(pszString)
>
>  ENDI
>
> // RESULT :     Showing a ErrorBox, "FAILED !!!"
>
> the C header:
> #define HASP_UPDATEINFO  "<haspformat format=\"updateinfo\"/>"   /*!<
> hasp_get_sessioninfo() format to get update info (C2V) */
> #define HASP_SESSIONINFO "<haspformat format=\"sessioninfo\"/>"  /*!<
> hasp_get_sessioninfo() format to get session info */
> #define HASP_KEYINFO     "<haspformat format=\"keyinfo\"/>"      /*!<
> hasp_get_sessioninfo() format to get key/hardware info */
>
> my constant:
> DEFINE HASP_UPDATEINFO := '<haspformat format=\"updateinfo\"/>' /*!<
> hasp_get_sessioninfo() format to get update info (C2V) */
> DEFINE HASP_SESSIONINFO := '<haspformat format=\"sessioninfo\"/>' /*!<
> hasp_get_sessioninfo() format to get session info */
> DEFINE HASP_KEYINFO  := '<haspformat format=\"keyinfo\"/>'  /*!<
> hasp_get_sessioninfo() format to get key/hardware info */
>
> I have done as you said, but still could not success call that function.
> Is there something I miss?
>
> Thanks.
> Regards,
> Darmadi

From: Mathias on
Try this:

DEFINE HASP_UPDATEINFO := '<haspformat format="updateinfo"/>'
DEFINE HASP_SESSIONINFO := '<haspformat format="sessioninfo"/>'
DEFINE HASP_KEYINFO := '<haspformat format="keyinfo"/>'

Mathias

On 5 Nov, 09:31, Mathias <mathias.hakans...(a)consultec.se> wrote:
> Hi,
>
> the string constants does not look right. There's no logic in these
> xml looking strings. I think you should check the documentation what
> they really should contain. Maybe "updateinfo", "sessioninfo" and
> "keyinfo", but this is just me guessing.
>
> Mathias
>
> On 5 Nov, 09:13, "Darmadi" <supp...(a)gfsoftindo.com> wrote:
>
>
>
> > Hi again Mathias,
>
> > I have modified my code:
>
> > ptrVendor := PTR( _CAST, String2Psz( HASP_VENDOR_CODE ) )
>
> > dwStatus := HASP_Login( 0 + HASP_PROGNUM_FEATURETYPE, ptrVendor,
> > @dwHASPHandle )
>
> > IF dwStatus == HASP_STATUS_OK
>
> >     pszString := NULL_PSZ
>
> >     dwStatus := HASP_Get_Sessioninfo( dwHASPHandle,
> > String2Psz(HASP_KEYINFO), @pszString )
>
> >     IF dwStatus == HASP_STATUS_OK
>
> >          cString := Psz2String(pszString)
> >          ErrorBox{SELF,cString}:Show()
>
> >      ELSE
> >          ErrorBox{SELF,"FAILED!!!"}:Show()
> >      ENDI
>
> >      hasp_free(pszString)
>
> >  ENDI
>
> > // RESULT :     Showing a ErrorBox, "FAILED !!!"
>
> > the C header:
> > #define HASP_UPDATEINFO  "<haspformat format=\"updateinfo\"/>"   /*!<
> > hasp_get_sessioninfo() format to get update info (C2V) */
> > #define HASP_SESSIONINFO "<haspformat format=\"sessioninfo\"/>"  /*!<
> > hasp_get_sessioninfo() format to get session info */
> > #define HASP_KEYINFO     "<haspformat format=\"keyinfo\"/>"      /*!<
> > hasp_get_sessioninfo() format to get key/hardware info */
>
> > my constant:
> > DEFINE HASP_UPDATEINFO := '<haspformat format=\"updateinfo\"/>' /*!<
> > hasp_get_sessioninfo() format to get update info (C2V) */
> > DEFINE HASP_SESSIONINFO := '<haspformat format=\"sessioninfo\"/>' /*!<
> > hasp_get_sessioninfo() format to get session info */
> > DEFINE HASP_KEYINFO  := '<haspformat format=\"keyinfo\"/>'  /*!<
> > hasp_get_sessioninfo() format to get key/hardware info */
>
> > I have done as you said, but still could not success call that function..
> > Is there something I miss?
>
> > Thanks.
> > Regards,
> > Darmadi

From: Darmadi on
Thanks Mathias,

Now completely working...

I have forgot too if in C they have to write \" mean "

Really thanks a lot Mathias,

Regards,
Darmadi

"Mathias" <mathias.hakansson(a)consultec.se> wrote in message
news:390a759f-acb6-4276-96bf-584cf6244186(a)m38g2000yqd.googlegroups.com...
Try this:

DEFINE HASP_UPDATEINFO := '<haspformat format="updateinfo"/>'
DEFINE HASP_SESSIONINFO := '<haspformat format="sessioninfo"/>'
DEFINE HASP_KEYINFO := '<haspformat format="keyinfo"/>'

Mathias

On 5 Nov, 09:31, Mathias <mathias.hakans...(a)consultec.se> wrote:
> Hi,
>
> the string constants does not look right. There's no logic in these
> xml looking strings. I think you should check the documentation what
> they really should contain. Maybe "updateinfo", "sessioninfo" and
> "keyinfo", but this is just me guessing.
>
> Mathias
>
> On 5 Nov, 09:13, "Darmadi" <supp...(a)gfsoftindo.com> wrote:
>
>
>
> > Hi again Mathias,
>
> > I have modified my code:
>
> > ptrVendor := PTR( _CAST, String2Psz( HASP_VENDOR_CODE ) )
>
> > dwStatus := HASP_Login( 0 + HASP_PROGNUM_FEATURETYPE, ptrVendor,
> > @dwHASPHandle )
>
> > IF dwStatus == HASP_STATUS_OK
>
> > pszString := NULL_PSZ
>
> > dwStatus := HASP_Get_Sessioninfo( dwHASPHandle,
> > String2Psz(HASP_KEYINFO), @pszString )
>
> > IF dwStatus == HASP_STATUS_OK
>
> > cString := Psz2String(pszString)
> > ErrorBox{SELF,cString}:Show()
>
> > ELSE
> > ErrorBox{SELF,"FAILED!!!"}:Show()
> > ENDI
>
> > hasp_free(pszString)
>
> > ENDI
>
> > // RESULT : Showing a ErrorBox, "FAILED !!!"
>
> > the C header:
> > #define HASP_UPDATEINFO "<haspformat format=\"updateinfo\"/>" /*!<
> > hasp_get_sessioninfo() format to get update info (C2V) */
> > #define HASP_SESSIONINFO "<haspformat format=\"sessioninfo\"/>" /*!<
> > hasp_get_sessioninfo() format to get session info */
> > #define HASP_KEYINFO "<haspformat format=\"keyinfo\"/>" /*!<
> > hasp_get_sessioninfo() format to get key/hardware info */
>
> > my constant:
> > DEFINE HASP_UPDATEINFO := '<haspformat format=\"updateinfo\"/>' /*!<
> > hasp_get_sessioninfo() format to get update info (C2V) */
> > DEFINE HASP_SESSIONINFO := '<haspformat format=\"sessioninfo\"/>' /*!<
> > hasp_get_sessioninfo() format to get session info */
> > DEFINE HASP_KEYINFO := '<haspformat format=\"keyinfo\"/>' /*!<
> > hasp_get_sessioninfo() format to get key/hardware info */
>
> > I have done as you said, but still could not success call that function.
> > Is there something I miss?
>
> > Thanks.
> > Regards,
> > Darmadi

First  |  Prev  | 
Pages: 1 2
Prev: Graphics4VO to vulcan
Next: Language settings problems