You cannot create a dll in VB with C++ coding/syntax. However, you can create a dll in VB with VB coding/syntax that does the same as what you want to accomplish with the C++ code but you may have to jump through some hoops. It all depends upon what you want to do.
Good Luck