EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how to setpassword?

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#5513
Posted: 03/19/2008 03:19:50
by xiaoqing lu (Basic support level)
Joined: 02/13/2008
Posts: 19

Hello All,

I use solfsExplorer to create a storagefile "solfs.st" with password "1234567890". Then I try to add mountpoing to it by the following steps, but always failed at StorageSetPassword() for error 87, which means invalid parameter. Could you help me check what's wrong? Thanks.

****************************
rc=StorageForceUnmount(fileName);
rc=StorageOpen(fileName,&Storage,'/',FALSE,TRUE);
rc=StorageSetRegistrationKeyEx(Storage, g_Key);
/*prepare passwd */
char *inputPasswd="1234567890";
wchar_t passwd[250];
memset(passwd,0,250);
mbstowcs(passwd,inputPasswd,250);

rc=StorageSetPassword(Storage,passwd,wcslen(passwd));

rc=StorageAddMountingPoint(Storage, Drive);
****************************
#5531
Posted: 03/20/2008 11:09:37
by Alexander Plas (EldoS Corp.)

Please specify password size in bytes not in characters. We will include appropriate changes in the documentation.
#5553
Posted: 03/20/2008 20:47:08
by xiaoqing lu (Basic support level)
Joined: 02/13/2008
Posts: 19

But I still got the same erro after change it as following:
rc=StorageSetPassword(Sto­rage,passwd,wcslen(passwd­)*sizeof(wchar_t));
#5557
Posted: 03/21/2008 02:25:04
by Alexander Plas (EldoS Corp.)

Moved to Helpdesk

Reply

Statistics

Topic viewed 2725 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!