I think you should specify the homedrive with a double colon, eg H:
When creating a user programmatically I advise to create the home- and user directories directly afterwards and set the correct NTFS permissions. Be sure to use the SID and not the username for settings the permissions because the Fileserver might not know the user yet because changes are not yet replicated.
Also when creating a user make sure you bind to a specific domain controller (eg the one with the PDC emulator role) and perform all operations on the same
dc to avoid similar replication issues.