create directory on windows machine from QNX

I am trying to make use of the mkdir() function, to create a directory via c programming on a network path which has a windows machine:

i have samba service running on the qnx box, therefore at the smb:> prompt i can create a folder on the share folder.
I am quite sure, the issue, is that when programmatically when i try to create a folder using mkdir on the remote path, i am missing the username and password credentials.

How can i provide programmatically this information to my software?
Also i am able to mount the windows share folder, and i can view it in my QNX file manager.
I am providing the following, when i try to creat a directory:

AFAIK you can’t do it programmatically aside using system() to invoke to proper command

at this stage, i am contemplating of using the common internet files system, and mounting the remote windows folder as a local folder, and giving the local path, as a argument to the mkdir function.
Not too sure at this stage if it will work.

Sounds like a good approach to me.

it works beautifully!